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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.