https://github.com/julekgwa/php_paginator
PHP and MySQL pagination.
https://github.com/julekgwa/php_paginator
mysql-php-pagination pagination php-pagination
Last synced: 2 months ago
JSON representation
PHP and MySQL pagination.
- Host: GitHub
- URL: https://github.com/julekgwa/php_paginator
- Owner: julekgwa
- Created: 2015-07-18T23:09:40.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-09T20:58:01.000Z (about 8 years ago)
- Last Synced: 2024-04-18T06:16:01.673Z (about 1 year ago)
- Topics: mysql-php-pagination, pagination, php-pagination
- Language: PHP
- Homepage:
- Size: 183 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Simple PHP Paginator
PHP paginator is a script that can generate pagination links + next/previous page links. It gives you full control of how you want your pagination to appear and how many pagination links, to appear per page.
##### Table of Contents
* [Features](#features)
* [Requirements](#requirements)
* [How to use](#how-to-use)
* [Creating pagination](#creating-pagination)
* [Screenshots](#screenshots)## Features
- Generate pagination links.
- Create pagination files, by using PHP copy function.
- Customizable with your own CSS or any CSS framework.## Requirements
PHP 5+## How to use
Include `Paginator.php` in your files.
```PHP
setItemLimitPerPage(4);
$Paginator->setTable('comments');
$Paginator->createPages();
$Paginator->setCurrentPageClass('active');
$Paginator->setUrlPattern('/php_paginator/');
$numPrevPage = 4;
$numNextPage = 4;
$paginationCssClass = 'pagination';?>
```## Creating pagination
```HTML
pagination($Paginator->getPageNumber(), $numPrevPage, $numNextPage, $paginationCssClass);
?>