jd2007 Posted July 18, 2007 Share Posted July 18, 2007 how do i exit from a for loop ... for e.g.... <?php> for ($b=0; $b<=$num; $b++) { if ($char[$b]==".") { } } ?> i'm checking it finds one ".", it stops looping. Link to comment https://forums.phpfreaks.com/topic/60507-how-do-i-exit-from-a-loop-stop-a-loop/ Share on other sites More sharing options...
DeadEvil Posted July 18, 2007 Share Posted July 18, 2007 <? $b = ""; for ($b=0; $b<=$num; $b++) { if ($char[$b]==".") { } } ?> Link to comment https://forums.phpfreaks.com/topic/60507-how-do-i-exit-from-a-loop-stop-a-loop/#findComment-300996 Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 does the above stop a loop ? Link to comment https://forums.phpfreaks.com/topic/60507-how-do-i-exit-from-a-loop-stop-a-loop/#findComment-300998 Share on other sites More sharing options...
DeadEvil Posted July 18, 2007 Share Posted July 18, 2007 im not sure Link to comment https://forums.phpfreaks.com/topic/60507-how-do-i-exit-from-a-loop-stop-a-loop/#findComment-300999 Share on other sites More sharing options...
clearstatcache Posted July 18, 2007 Share Posted July 18, 2007 <? $b = ""; for ($b=0; $b<=$num; $b++) { if ($char[$b]==".") <<==== is this? the condition that will terminate the loop? { break; } } ?> Link to comment https://forums.phpfreaks.com/topic/60507-how-do-i-exit-from-a-loop-stop-a-loop/#findComment-301000 Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 yes..thank you so much... Link to comment https://forums.phpfreaks.com/topic/60507-how-do-i-exit-from-a-loop-stop-a-loop/#findComment-301060 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.