Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pagination with 10 pages - 5 either side

732941Feb 5 2010 — edited Feb 9 2010
Hi all,

I'm trying to get some pagination to my results page.
I would like the navigation links to only show 5 pages on either side of the current page.

For example if I have 40 pages in total:

Page 1 shows:
*1* _2_ _3_ _4_ _5_ _6_ _7_ _8_ _9_ _10_ [_Last_] Next

Page 18 shows:
[_First_] _14_ _15_ _16_ _17_ *18* _19_ _20_ _21_ _22_ _23_ [_Last_] Next

Currently I have all the page links (1-40 echoed) by using this tutorial:
http://www.phpbuilder.com/tips/item.php?id=2

Hope someone can help as I'm completed stumped!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2010
Added on Feb 5 2010
1 comment
2,653 views