PHP Pagination class: Generate HTML to display links for pagination

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 185 All time: 8,500 This week: 196Up
Version License PHP version Categories
php-pagination-class 1.0MIT/X Consortium ...5HTML, PHP 5
Description Author

This class can generate HTML to display links for pagination.

It takes as parameters the total number of entries in a listing to be split in pages, the limit number of entries to display in a page, the current page number and the base URL of the page.

The class can return HTML to display links to let the user go between the different pages of the listing.

The link presentation can be customized using CSS styles.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq <contact>
Classes: 46 packages by
Country: Pakistan Pakistan
Innovation award
Innovation award
Nominee: 4x

Details

PHP Pagination

Simple pagination library implements a paging interface on collections of things.

Requirement

  • PHP
  • Composer

install

run this command


## usage

<!-- Compiled and minified CSS --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> <!-- Compiled and minified JavaScript --> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> <?php use Lablnet\Pagination; require '../vendor/autoload.php'; $pag1 = new Pagination(100,10,5,'/'); echo $pag1->pagination(); $pag2 = new Pagination(1000,10,25,'https://example.com/blogs/'); echo $pag2->pagination();


  Files folder image Files  
File Role Description
Files folder imageexample (1 file)
Files folder imagesrc (1 file)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file readme.md Doc. Read me

  Files folder image Files  /  example  
File Role Description
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file Pagination.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:185
This week:0
All time:8,500
This week:196Up

For more information send a message to info at phpclasses dot org.