Forum Moderators: mack
I am developing a paging system which fetches records from my database and then prints the number of pages depending upon total rows.
What my problem is that due to plenty of records my page_numbering is going out of window..(more than 100 pages are displaying)
A part of code look like this -
$no_of_pages = $total_rows / $limit;
$no_of_pages = ceil($no_of_pages);
for($i=1; $i<=$no_of_pages; $i++)
{
print "<a test.php?page=$i></a>";
}
What should i do to control the number of pages being displayed (Say 10 and then display 10 to 20 and so on)?