1. Go to this page and download the library: Download adamb/pagination 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/ */
adamb / pagination example snippets
ager\Pagination;
$numberOfRecords = 342; // This can also be generated from a database query
$pageURL = '/results.php';
$currentPage = $_GET['page'];
$resultsPerPage = 50; // This is the default value so can be removed
$pagination = new Pagination();
echo($pagination->paging($numberOfRecords, $pageURL, $currentPage, $resultsPerPage));
ager\Pagination;
$numberOfRecords = 342; // This can also be generated from a database query
$pageURL = '/results.php';
$currentPage = 3; //$_GET['page'];
$pagination = new Pagination();
$pagination->setPaginationClass('my_custom_pager')
->setActiveClass('this_is_active');
echo($pagination->paging($numberOfRecords, $pageURL, $currentPage));