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']"; } } } ?> Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 3, 2007 Share Posted July 3, 2007 Yes you can Quote Link to comment 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?? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 3, 2007 Share Posted July 3, 2007 Yep Quote Link to comment 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. Quote Link to comment 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.