chrchcol Posted September 6, 2009 Share Posted September 6, 2009 I have a code snippet <? $a=getSearchResults($db); arsort($a); foreach ($a as $term=>$count) { print "<tr><td>"; print "<a href='".searchTermToGoogleSearch($term)."'>$term</a></td><td>$count</td></tr>\n"; } ?> The purpose of it just prints out the results. The problem is it prints all the results on the same page. Is there a way to only print say 10 results per page. Link to comment https://forums.phpfreaks.com/topic/173286-search-results-help/ Share on other sites More sharing options...
play_ Posted September 6, 2009 Share Posted September 6, 2009 You wanna look into pagination. Tons of examples, just google it. Also, don't use <?, use <?php Link to comment https://forums.phpfreaks.com/topic/173286-search-results-help/#findComment-913426 Share on other sites More sharing options...
chrchcol Posted September 6, 2009 Author Share Posted September 6, 2009 IS it really hard to implement pagination into this. I see the examples but its a little beyond me at the moment lol Link to comment https://forums.phpfreaks.com/topic/173286-search-results-help/#findComment-913427 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.