PHP - Loops
What is the output of this PHP code?
$i = 0;
while ($i < 3) {
$j = 0;
while ($j < 3) {
if ($j == 1) {
break 2;
}
echo "$i$j ";
$j++;
}
$i++;
}What is the output of this PHP code?
$i = 0;
while ($i < 3) {
$j = 0;
while ($j < 3) {
if ($j == 1) {
break 2;
}
echo "$i$j ";
$j++;
}
$i++;
}break 2; exits both loops immediately.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions