iPixel Posted August 3, 2007 Share Posted August 3, 2007 I need some help, at least with the logic i suppose. I've been googling pagination scripts but all i am able to find is the typical Prev 1 2 3 4 5 Next and when u click next it takes you to page 3. Or the other one which only has Prev 1 of 5 Next. Which just doesnt help. Here's what im looking for ... Prev10 1 2 3 4 5 6 7 8 9 10 Next10 And when you click Next10 the list will look like so Prev10 11 12 13 14 15 16 17 18 19 20 Next10 And so on... Im not quite sure how to get this done, and ive had lots of trouble locating a tutorial or a script even that does this. I've got my $page = isset($_GET['page']) ? $_GET['page'] : null; if (!is_null($page)) { $page = $_GET['page']; } $limit = 30; if(empty($page)) { $page = 1; } $limitvalue = $page * $limit - ($limit); and i already use the $limitvalue and $limit in the queries i run. All i need help with is the generating of the 10 pages with the Previous10 and Next10 links. Any and all help is greatly appreciated. Thank you in advance. ~iPixel Quote Link to comment https://forums.phpfreaks.com/topic/63220-help-with-pagination/ Share on other sites More sharing options...
deadimp Posted August 3, 2007 Share Posted August 3, 2007 What you could do is have the range of pages shown be dependent upon the current page you're viewing, much like how the pagination for this forum works. So if you really needed to view the next ten pages, you could just increase the page count from the current by 10, and solve that problem. Quote Link to comment https://forums.phpfreaks.com/topic/63220-help-with-pagination/#findComment-315243 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.