![]() |
pagination question
why is it no matter how hard i try the switch in my head wont go on when i try to study and understand how pagination works?
i keep trying to ask my self how the formulas were figured out and stuff like that my head starts to to hurt lol am i the only one? lol |
Where are you having problems? To determine how many pages you need, you need 2 variables: the total number of "items" (be it entries in a database or just some records in an array), and the number of "items" you wish to display on a page. The number of resulting pages will be total_number_of_items / number_of_items_per_page. It's just simple math...nothing complicated.
Here's a simple hands-on example: PHP Code:
|
I had a hard time myself before. Then I created my own independant paginationclass(meaning it isn't locked to pagination of dbresults, but it can paginate anything), and once I saw - and worked with - the formulas, it all became clear.
You should read it and see if anything becomes clearer. http://www.talkphp.com/script-giveaw...ion-class.html |
| All times are GMT. The time now is 03:28 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0