MasterACE14 Posted June 18, 2007 Share Posted June 18, 2007 How do you echo a variable or run a function a few hundred times, without having to code it like this: <?php func(); func(); func(); func(); // or echo($var); echo($var); echo($var); echo($var); echo($var); ?> Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/56021-solved-quick-noob-question/ Share on other sites More sharing options...
aniesh82 Posted June 18, 2007 Share Posted June 18, 2007 You can use any loop, if you know the the limits (number of times to execute) Quote Link to comment https://forums.phpfreaks.com/topic/56021-solved-quick-noob-question/#findComment-276670 Share on other sites More sharing options...
ToonMariner Posted June 18, 2007 Share Posted June 18, 2007 <?php for($i=0;$i<$max;$i++) { func(): echo $var; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/56021-solved-quick-noob-question/#findComment-276671 Share on other sites More sharing options...
MasterACE14 Posted June 18, 2007 Author Share Posted June 18, 2007 Excellant, Thanks for help guys. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/56021-solved-quick-noob-question/#findComment-276673 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.