Jump to content

Pagination Class Help


ShoeLace1291

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.