On my search engine I get results via xml from blekko.com
I use: http://blekko.com/ws/?q=google/rss And adding: &p= *number*
I can get different pages of results, e.g. Page 1, 1 - 15 results
Page 2, 15 - 30 results
Like at the bottom of google, however I also get a number of total results
With those two (total & page number) is there any way to generate the right amount of links at the bottom for a next button, page1 results, page 2 results ect...
$count is the total and there are 15 results per page
If I understand you correctly you want something like:
for($i; $i<10 && $i<$totalPages; $i++)
{
echo '<a href="search.php?p='.$i.'">'.$i.'</a>';
}
?
Not sure of what you want to do but usually to create links to different pages of results you need the total number of results and the nb of results you want to display per page. You then make a simple division to get the number of pages.