开发者

PHP pagination range

开发者 https://www.devze.com 2023-03-22 18:22 出处:网络
开发者_运维百科I\'ve tried using Google and other sources but I can\'t find an answer. I have even looked at other\'s coding and still don\'t understand. I\'m wanting to create a pagination (success)
开发者_运维百科

I've tried using Google and other sources but I can't find an answer. I have even looked at other's coding and still don't understand. I'm wanting to create a pagination (success) but when displaying the links, I want to be able to add a range. For example: 123...789...13 14 15 and so on. So it skips a few links until near the number.

Could someone explain how to do this?

Thank you.


For doing this in a general way that allows a user to rapidly reach any page in the entire range, consider using "logarithmic pagination" as described in my answer here:

How to do page navigation for many, many pages? Logarithmic page navigation

PHP code is included, and it'll do everything your question requests.

0

精彩评论

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