PDA

Click to See Complete Forum and Search --> : [RESOLVED] Complex Question


onh1986
Jul 9th, 2006, 09:44 PM
Hello
I have some names in my database.
And I want to show them in pages not single page (by using PHP) and each page contains 500 names only.
So, there will be (n) pages.

Example: If I have 2600 names, there will be 6 pages (Page 6 will contain 100 names only).

The question is: how can I know number of pages (n) if the number of names is indivisible to 500? (such as 2600-2650-2700... and more).

If the number of names is divisible to 500 (such as 2500), n=2500/500=5 pages (it's very simple).

Anybody help me, please.
If anybody didn't get it, I'll explain more.

Thanks & Regards

visualAd
Jul 10th, 2006, 12:17 AM
You need to have a look into pagination. There is an example and function in the thread below:

http://www.vbforums.com/showthread.php?p=1988751#post1988751

onh1986
Jul 10th, 2006, 12:22 AM
Thanks
It's a good example.