开发者

How do to "Showing 1-10 of 728 results"

开发者 https://www.devze.com 2023-01-29 03:14 出处:网络
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'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

0

精彩评论

暂无评论...
验证码 换一张
取 消