PHP Classes


Recommend this page to a friend!
  Classes of Ujah Chigozie peter   Peter PHP Pagination Class   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Peter PHP Pagination Class
Generate HTML to navigate between listing pages
Author: By
Last change:
Date: 11 months ago
Size: 1,318 bytes


Class file image Download

PHP Pagination

Pagination is a simple pagging in php


Installation is super-easy via Composer:

composer require peterujah/pagination


Hierarchical can be use as an array, html or google organizations chart

 use Peterujah\NanoBlock\Pagination;
 $paging = new Pagination($rowCount, Pagination::LIST);
 $paging = new Pagination($rowCount, Pagination::LINK);

Dump array

 $paging = new Pagination(100, Pagination::LIST);

 $paging = new Pagination(100, Pagination::LIST);
 $html = $paging->setCurrentPage($_GET["page"]??1)->get();

Use built in css style, only work with $paging->show() method


Initalisation options new Pagination($rowCount, Pagination::LINK)

| Options | Description | |-----------------|-------------------------------------------------------------------------------------| | LIST | Retrieve result as an html list | | LINK | Retrieve result in HTML link |