Page 1 of 1

Page Numbering problem

Posted: Wed Aug 19, 2009 10:54 pm
by GaRd3NiA
Hi, i m now working on a page numbering function. i have go through quite a lot of the examples from google but none of them do what i need. Below is my case:
I have, for example an array holding 132 values, and i wan to show only 5 items in a page, so there is a total of 27 pages.The page number then will show something like below,
Page 1 2 3 4 5 > >> , when we click on ">" it will show
Page < 6 7 8 9 10 > >>, click on ">" again, it will show
Page << < 11 12 13 14 15 > >>, and so on. click on "<<" or ">>" will bring to the first and last page.

Any idea on how to make this thing happened? Thanks...

Re: Page Numbering problem

Posted: Wed Aug 19, 2009 11:21 pm
by aceconcepts
What did you search for using Google?

This is known as "pagination". Try searching using this term - there are lots of tutorials out there.

In brief, what you'd need to consider is number of results per page, LIMIT 0, 5 and url parameters.

Re: Page Numbering problem

Posted: Thu Aug 20, 2009 1:58 am
by Christopher
I posted some links here that contain more links:

viewtopic.php?p=561007#p561007

Re: Page Numbering problem

Posted: Thu Aug 20, 2009 8:44 am
by juma929
Hello,

Are you using a database or just a hard coded array of a certain number of items?

Thanks :)