almightyegg Posted July 3, 2007 Share Posted July 3, 2007 Can you have while loops within while loops? eg: <?php while($something){ if($something2 == $something3){ while($something4){ echo "$something4['something']"; } } } ?> Link to comment https://forums.phpfreaks.com/topic/58292-solved-while-question/ Share on other sites More sharing options...
pocobueno1388 Posted July 3, 2007 Share Posted July 3, 2007 Yes you can Link to comment https://forums.phpfreaks.com/topic/58292-solved-while-question/#findComment-289008 Share on other sites More sharing options...
almightyegg Posted July 3, 2007 Author Share Posted July 3, 2007 Can you have as many whiles within whiles as you wish?? Link to comment https://forums.phpfreaks.com/topic/58292-solved-while-question/#findComment-289010 Share on other sites More sharing options...
pocobueno1388 Posted July 3, 2007 Share Posted July 3, 2007 Yep Link to comment https://forums.phpfreaks.com/topic/58292-solved-while-question/#findComment-289017 Share on other sites More sharing options...
per1os Posted July 3, 2007 Share Posted July 3, 2007 Can you have as many whiles within whiles as you wish?? It will suck up processing power to have too many loops. There is the O(n) notation which depicts how many times a function/loop will run before it is done. You want to optimize and do minimal loops as possible. Just be informed of that. Link to comment https://forums.phpfreaks.com/topic/58292-solved-while-question/#findComment-289047 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.