sitorush Posted May 4, 2007 Share Posted May 4, 2007 Hello friends i want to know what is the syntax for, "exit for" in PHP. ex. for ($row=0; $row<$baris; $row++) { echo "<tr>\n"; for ($col=0; $col<$kolom; $col++) { if (isset($chart [ 'tampil' ] [$row] [$col])) { echo $string1.$chart [ 'tampil' ] [$row] [$col].$string2 ; } } echo "</tr>\n"; } i want to make --- else { exit both "for loop" thanks for your help... sitorush. Link to comment https://forums.phpfreaks.com/topic/49946-solved-exit-for/ Share on other sites More sharing options...
genericnumber1 Posted May 4, 2007 Share Posted May 4, 2007 <?php for($i = 0; $i < 100 ++$i) { for($j = 0; $j < 100 ++$j) { feed('joe'); if($joe == 'full') { break 2; } } } ?> Link to comment https://forums.phpfreaks.com/topic/49946-solved-exit-for/#findComment-245167 Share on other sites More sharing options...
sitorush Posted May 4, 2007 Author Share Posted May 4, 2007 ah.. i see break 2; thank you very much. Link to comment https://forums.phpfreaks.com/topic/49946-solved-exit-for/#findComment-245173 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.