Shyke Posted August 28, 2014 Share Posted August 28, 2014 Hi, so i kinda planned to code a new project. But i'm not quite sure about this. I could imagine you could pull the pages out. So let me explain. So i believe google is generating these numbers automatically and automatically linking it to a page. Is there a way to do that easily? Would help me alot. So if i have 50 result per page. Thats the thing i want! If 50 result = > then new page! And then it should create a new number down there. =) Any questions? ASK ME! Quote Link to comment https://forums.phpfreaks.com/topic/290709-is-there-a-way-to-auto-generate-pages/ Share on other sites More sharing options...
Barand Posted August 28, 2014 Share Posted August 28, 2014 You are talking about "pagination". Try Googling "php pagination". You should find a few tutorials Quote Link to comment https://forums.phpfreaks.com/topic/290709-is-there-a-way-to-auto-generate-pages/#findComment-1489197 Share on other sites More sharing options...
Jacques1 Posted August 28, 2014 Share Posted August 28, 2014 Well, just think about it. If you have, say, 210 results, how many pages are there? How do you calculate this number? When you know that, all you need is a for loop and a way to include the page number in the URL. The latter can be as simple as adding a page parameter: https://yoursite.com/list.php?page=123 Quote Link to comment https://forums.phpfreaks.com/topic/290709-is-there-a-way-to-auto-generate-pages/#findComment-1489198 Share on other sites More sharing options...
Solution Shyke Posted August 28, 2014 Author Solution Share Posted August 28, 2014 (edited) Okay, i thought there was an easy fix. ^^ But i learned. I will just create my own instead, just like Jacques1 pointed out! ------ There will be a follow up later when i'm done with a rating system. Edited August 28, 2014 by Shyke Quote Link to comment https://forums.phpfreaks.com/topic/290709-is-there-a-way-to-auto-generate-pages/#findComment-1489200 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.