ShoeLace1291 Posted February 15, 2011 Share Posted February 15, 2011 I'm in the process of writing my own pagination class. The only thing I am having trouble with is which page number links to display and how to do it. I want three links to display before the current page, and three after it. for example: if the current page is 11, then the links displayed should be 8, 9, 10, 11, 12, 13, 14. I'm having trouble coming up with an if statement that makes sense. Maybe I need more than one, I don't know. How would you suggest I do this? Link to comment https://forums.phpfreaks.com/topic/227725-pagination-class-help/ Share on other sites More sharing options...
litebearer Posted February 15, 2011 Share Posted February 15, 2011 When re-venting the wheel, it pays to see how the other guy made his tires round - here is an excellent and easy to use pagination class. Look at his code and see what technique he uses... http://phpsense.com/php/php-pagination-script.html Link to comment https://forums.phpfreaks.com/topic/227725-pagination-class-help/#findComment-1174466 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.