Hi,
I'm trying to emulate the search returns navigation used by Google.
In certain cases I have a total of 200+ results returned. I only want a maximum of 10 results per page with numbered page navigation at the bottom of the page.
Now, I have this working all well and good so far. However in the above example it would show links for pages 1 - 20 seperately. As I have a limited column space I want to show page links for only pages 1 - 10. Then, when the user clicks on page 10 in the lower navigation (or when he / she arrives at that page via the Next button) the the relevant links for page 10 - 20 would appear.
The loop that prints the page numbers is as follows:
for ($i=1; $i <= $pages; $i++)
{
$ppage = $limit*($i - 1);
if ($ppage == $page) {
echo(" <b>$i</b> | ");
} else {
echo(" <a href='#'>$i</a> | ");
}
}
Can anyone suggest how this might be modified to display page links as described?
Many thanks,
Gary