OK here is my code
<?
for ($a=10; $a<100; $a += 10)
{
echo $a;
if ($a<=10)
{
continue 2;
}
echo "<br>";
echo "1";
echo "2";
}
?>
I am trying to understand what the continue command actaully does. Can you please explain what its purpose is and why I get the error
10
Fatal error: Cannot break/continue 2 levels in /var/www/learn.php on line 7
Thanks
<?
for ($a=10; $a<100; $a += 10)
{
echo $a;
if ($a<=10)
{
continue 2;
}
echo "<br>";
echo "1";
echo "2";
}
?>
I am trying to understand what the continue command actaully does. Can you please explain what its purpose is and why I get the error
10
Fatal error: Cannot break/continue 2 levels in /var/www/learn.php on line 7
Thanks