Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(mysql_num_rows($aResult) > 0)
- {
- while($aRow = mysql_fetch_array($aResult))
- {
- $articles[$count] = array (
- "articleId" => $aRow["articleId"],
- "title" => $aRow["title"],
- "summary" => $aRow["summary"],
- "url" => $aRow["url"]
- );
- $count++;
- }
- else(sizeof($articles) == 0 ) {
- echo "No results found for '$search_keywords'<br>";
- echo "<a href='search.php'>Go Back</a>";
- }
- }
- if(sizeof($articles) > 0)
- {
- $articles = array_unique($articles);
- echo '<div align="center"><font color="purple">';
- echo "<h1>" . sizeof($articles);
- echo (sizeof($articles) == 1 ? " Item(s)" : " Item(s)");
- echo " found:</h1>";
- foreach($articles as $a => $value)
- {
- ?>
- <a href="<?=$articles[$a]["url"]?> " target="mainframe">
- <b><u><?php echo $articles[$a]["title"]; ?></u></b>
- </a>
- <br><?php echo $articles[$a]["summary"] . "..."; ?>
- <br>
- <a href="<?=$articles[$a]["url"]?>" target="mainframe">
- <?=$articles[$a]["url"]?></a>
- <br><br>
- <?php
- }
- }
- ?>
Add Comment
Please, Sign In to add comment