Home › Forums › Back End › Simple PHP Pagination › Reply To: Simple PHP Pagination
August 25, 2014 at 7:34 am
#180494
__
Participant
the pagination will be for the all categories page, and about 10 other pages each being a different movie genre like action/adventure, comedy etc.
Do they select from different database tables, or all from the same table?
I’d start with two functions:
- a function to determine the desired offset, based on the current page and the desired results per page
- a function to write HTML markup for a collection of pagination links
The first is very simple — it’s basically just wrapping the code I showed above into a function. For the second function, you will need to decide what sort of finished HTML you want for the pagination links.