1. Go to this page and download the library: Download elzobrito/olivia-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/ */
elzobrito / olivia-pagination example snippets
use OliviaPagination\Pagination;
liviaPagination\Pagination;
$pagination = new Pagination(10, 'page');
$pagination->set_total(95);
$offset = $pagination->get_start();
$limit = $pagination->get_total_perPage();
// Exemplo de SQL:
// SELECT * FROM produtos LIMIT {$offset}, {$limit}
echo $pagination->page_links('produtos.php');
$pagination = new Pagination(20, 'pagina', 'my-custom-class');