1. Go to this page and download the library: Download anstag/pager 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/ */
anstag / pager example snippets
php
$obj = new Anstag\Pager\DirPager(
new Anstag\Pager\PagesList(),
'photos',
3,
2
);
echo "<pre>";
print_r($obj->getItems());
echo "</pre>";
echo "<p>$obj</p>";
php
$obj = new Anstag\Pager\FilePager(
new Anstag\Pager\ItemsRange(),
'largetextfile.txt'
);
echo "<pre>";
print_r($obj->getItems());
echo "</pre>";
echo "<p>$obj</p>";