elmas156 Posted September 11, 2008 Share Posted September 11, 2008 Hello everyone, I'm trying to figure out how to limit the number of returns I get on a single page in a while loop. For example: If there are 20 returns from my while loop, I only want to display 10 of them on a single page then have a link on the page to go to the next 10 returns. I would post some code but I'm not really sure where to start with a task such as this, other than the while loop itself, which is very basic as of now. Is this too complicated??? Thanks in advance for any help. Link to comment https://forums.phpfreaks.com/topic/123724-limit-returns-in-a-while-loop/ Share on other sites More sharing options...
Zane Posted September 11, 2008 Share Posted September 11, 2008 This is called Pagination http://www.phpfreaks.com/tutorial/basic-pagination Link to comment https://forums.phpfreaks.com/topic/123724-limit-returns-in-a-while-loop/#findComment-638865 Share on other sites More sharing options...
phpretard Posted September 11, 2008 Share Posted September 11, 2008 $result = mysql_query("SELECT * FROM table LIMIT 10") while($row = mysql_fetch_array($result)) { 10 } Link to comment https://forums.phpfreaks.com/topic/123724-limit-returns-in-a-while-loop/#findComment-638869 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.