1. Go to this page and download the library: Download volnix/paginate library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
volnix / paginate example snippets
// instantiate our pager
$pager = new \Volnix\Paginate\Pager;
// actually set the pagination parameters
$pager->paginate(1000, 5); // 100 results in result-set, current page = 5
// both of the below examples do the exact same thing
$pager = new \Volnix\Paginate\Pager(5, 5, 'foo');
$pager = new \Volnix\Paginate\Pager;
$pager->setConfig(5, 5, 'foo');
public $paginate = true; // whether to even paginate or not
public $current_page = 1; // current page
public $query_skip = 0; // the skip step to be passed into queries
public $result_count = 0; // how many results we're paginating
public $min_page = 1; // min page of all pages
public $max_page = 1; // max page (i.e. results / results per page)
public $low_page = 1; // low page in range of pages being displayed
public $high_page = 1; // high page in range of pages being displayed
$pager = new \Volnix\Paginate\Pager;
$pager->setConfig(5, 5, 'foo')->paginate(100);
// OR
$pager = (new \Volnix\Paginate\Pager)->setConfig(5, 5, 'foo')->paginate(100);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.