PHP code example of rundiz / pagination
1. Go to this page and download the library: Download rundiz/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/ */
rundiz / pagination example snippets
// You don't need to include or ion/Pagination.php';
$total_records = 1000;
$start = (isset($_GET['start']) ? intval($_GET['start']) : 0);
if ($start < 0) {
$start = 0;
}
$limit = 10;
$Pagination = new \Rundiz\Pagination\Pagination();
// Set options to the pagination class.
$Pagination->base_url = 'http://localhost/your-project/page.php?start=%PAGENUMBER%';// *This property must be set.
$Pagination->total_records = $total_records;// *This property must be set.
$Pagination->page_number_value = $start;// *This property must be set.
echo $Pagination->createLinks();