Skip to content

michaelcgorman/pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

pagination

I despise writing code to handle pagination. Every time I have to do it, I dread it, procrastinate, etc. And then every time I reload during development, I get way more data than I need. And I often decide just to return all results rather than deal with pagination. Not exactly ideal. So I made this class, Paginate, to take care of it for me.

Example Usage

$pagination = new Paginate($array_with_all_results);
$pagingation_links = $pagination->getLinks();
$current_page_results = $pagination->getResults();
$total_result_count = $pagination->resultCount();

foreach($current_page_results as $result) {
	echo $result;
}

echo $pagination_links;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages