PHP Classes

Result Pager: Split listings in multiple pages

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 818 All time: 4,197 This week: 182Up
Version License PHP version Categories
resultpager 1.0Free for non-comm...5.0HTML, PHP 5
Description Author

This class can be use to generate navigation of listings split in multiple pages.

It takes as parameters the total number of items in the listing, the limit number of items to display per page and the number of the current page.

The class returns an array with the number of the first item and the range of items to show in the current page, the total number of pages, the need to present the next and previous links, and the LIMIT clause if the listing is to be retrieved from a MySQL database or similar.

The class also provides an iterator to return the navigation page offsets or HTML links to display in the current page. The template of the links is configurable.

Picture of Chris Pliakas
Name: Chris Pliakas <contact>
Classes: 2 packages by
Country: United States United States
Age: 40
All time rank: 1494221 in United States United States
Week rank: 553 Up60 in United States United States Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example of pager class
Plain text file pager.php Class Pager class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:4,197
This week:182Up