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 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) 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; } ?> 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 Link to comment https://forums.phpfreaks.com/topic/56021-solved-quick-noob-question/#findComment-276673 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.