Forum Moderators: mack

Message Too Old, No Replies

paging system

         

hswaseer

12:54 pm on Mar 2, 2005 (gmt 0)

10+ Year Member



Hi,

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)?

hswaseer

11:58 am on Mar 3, 2005 (gmt 0)

10+ Year Member



waiting for suggestions