Skip to content

alicaglayan/Pagination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Pagination

$pagination = new Pagination();

$pagination->setCurrentPage(1)
    ->setMaxPerPage(10)
    ->setMaxPerViewPage(5)
    ->setUriString('stories/')
    ->setTotalCount(500);

print($pagination->render());

Gives output:

<li><a class="active">1</a></li>
<li><a href="/stories/page/2/">2</a></li>
<li><a href="/stories/page/3/">3</a></li>
<li><a href="/stories/page/4/">4</a></li>
<li><a href="/stories/page/5/">5</a></li>
<li><a href="/stories/page/2/">Next</a></li>
<li><a href="/stories/page/50/">End</a></li>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages