PHP Classes

Result Pager: Split listings in multiple pages

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 56%Total: 819 All time: 4,217 This week: 488Up
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

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:819
This week:0
All time:4,217
This week:488Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:56%StarStarStar
Rank:1781