PHP code example of mrsems / paginator-php
1. Go to this page and download the library: Download mrsems/paginator-php 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/ */
mrsems / paginator-php example snippets
use App\Paginator\Paginator;
$items = range(1, 50);
$result = Paginator::paginate($items, 5);
foreach ($result['items'] as $item): endforeach; if ($result['hasPrevious']): endif; if ($result['hasNext']): endif;