If, within a for loop, there is an included file, and in that included file, there's another for loop, a continue 2 doesn't work
is this by design? or is this a bug? AM totally at a loss
info below
contents of file temp_outer_loop.php
<pre>
<?php
for ($z=0; $z < 20 ; $z++) {
echo "\r\nlooping z $z of 20";
for ($a=0; $a < 20 ; $a++) {
echo "\r\n\tlooping a $a of 20";
if ($a==10) continue 2;
}
}
echo "<hr>";
for ($x=0; $x < 20 ; $x++) {
echo "\r\nlooping x $x of 20";
include_once(__DIR__ . "/temp_inner_loop.php");
}
?>
contents of file temp_inner_loop.php
<?php
for ($y=0; $y < 20 ; $y++) {
echo "\r\n\tlooping y $y of 20";
if ($y==5) continue 2;
}
?>
continue 2?continue 2statement and see how it prints.