22/05
2018
Set a Pagination from an array of results
Class to Paginate results from an array by Eric Zeidan k2klettern@gmail.com, (*1)
How to use it, (*2)
Clone in your vendor/, (*3)
Install via composer update, (*4)
or, (*5)
composer create-project k2klettern/array-pagination, (*6)
To get the Pagination just instantiate the class, (*7)
$arrayToPaginate;, (*8)
$c = new \arrayPagination\thePagination(); $c->setArray($arrayToPaginate); $arrayFiltered = $c->getPagination();, (*9)
Do whatever you want with your array filtered, (*10)
print the pagination, (*11)
$c->theArrayPagination();, (*12)