An open API service indexing awesome lists of open source software.

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.

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);
?>