sprintlife Posted March 14, 2009 Share Posted March 14, 2009 Hey guys, You guys do great work here and maybe you can shine some light on an issue I am having. I know a few ways I can making do a work around. But I want to see if you guys can come up with something better. for($i = ($page - 4); $i <= $total_pages; $i++) { if(($page) == $i) { echo $i . " "; } elseif($i <= ($page + '4')) { echo "<a href=\"http://domainname.com/cp/$pagenext/$i\">$i</a> "; } } How do I get it to start from 0 once it's at page 1? It works great when I am page 5 and higher LOL. Link to comment https://forums.phpfreaks.com/topic/149408-for-issue-on-doing-next-pages-i-just-lost-today/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.