I'm wondering on how to output "Showing 1-10 of 728 results" in PHP. Say I have the total rows count, the items per page and the offset, what would be the best way to output that phrase? How would I deal with single results, no results, an offset higher than the total row counts, pages that don开发者_高级运维't have enough items to be higher than the per page count? I'm a bit lost. Thanks in advance for your help.
It is called pagination. Here is a solid tutorial: Pagination tutorial
精彩评论