Pagination with 10 pages - 5 either side
732941Feb 5 2010 — edited Feb 9 2010Hi 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!