johnsmith153 Posted June 4, 2009 Share Posted June 4, 2009 Hi, sorry, very simple, but I always forget this I want to run a "for" loop 10 times i.e: <?php for () { echo $a."<br>"; } ?> ..so it will output 1 2 3 4 5 6 7 8 9 10 Quote Link to comment https://forums.phpfreaks.com/topic/160955-solved-ultra-simple/ Share on other sites More sharing options...
Andy-H Posted June 4, 2009 Share Posted June 4, 2009 for ($i = 1; $i < 10; $i++) { echo $i . '<br >'; } Quote Link to comment https://forums.phpfreaks.com/topic/160955-solved-ultra-simple/#findComment-849405 Share on other sites More sharing options...
Maq Posted June 4, 2009 Share Posted June 4, 2009 That will only go up to 9. Change it to $i johnsmith, A little googling and you could have easily gotten the answer to this. Please make an attempt yourself first. Quote Link to comment https://forums.phpfreaks.com/topic/160955-solved-ultra-simple/#findComment-849407 Share on other sites More sharing options...
MadTechie Posted June 4, 2009 Share Posted June 4, 2009 Direct from the manual <?php /* example 1 */ for ($i = 1; $i <= 10; $i++) { echo $i; } //... snip ?> Quote Link to comment https://forums.phpfreaks.com/topic/160955-solved-ultra-simple/#findComment-849418 Share on other sites More sharing options...
roopurt18 Posted June 4, 2009 Share Posted June 4, 2009 Sounds like a take home quiz to me. Quote Link to comment https://forums.phpfreaks.com/topic/160955-solved-ultra-simple/#findComment-849486 Share on other sites More sharing options...
MadTechie Posted June 4, 2009 Share Posted June 4, 2009 I'm going to mark this as solved but please remember to click topic solved (bottom left) Quote Link to comment https://forums.phpfreaks.com/topic/160955-solved-ultra-simple/#findComment-849535 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.