PHP code example of componenta / paginator
1. Go to this page and download the library: Download componenta/paginator 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/ */
componenta / paginator example snippets
use Componenta\Stdlib\Paginator;
$page = new Paginator(
results: $posts,
limit: 20,
offset: 40,
totalCount: 95,
);
$page->currentPage; // 3
$page->totalPages; // 5
$page->hasNextPage; // true
$page->nextOffset; // 60