how to control interval of for loop?

lonniecrow

New Member
I have a for loop, with a $count of 23.\[code\]for($page=0; $page < $count; $page++) { echo $page;}\[/code\]What I want to do is instead of increasing the page variable by one, I want to do it by 10 so that when $page is echoed it I want the results to be 10, 20, and not go past 23.\[code\]for($page=0; $page < $count; $page+10) { echo $page;}\[/code\]When I do this, the loop continues infinitely, echoing 0. IF anyone has any advice, I would really appreciate it. Thanks in advance.
 
Back
Top