Login   Register  
PHP Classes
elePHPant
Icontem

Result Pager: Split listings in multiple pages

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2007-04-17 (7 years ago) RSS 2.0 feedNot enough user ratingsTotal: 806 All time: 3,933 This week: 1,343Up
Version License PHP version Categories  
resultpager 1.0Free for non-commercial...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: 32
All time rank: 1378185 in United States United States
Week rank: 1135 Up123 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  
 0%Total:806All time:3,933
 This week:0This week:1,343Up