?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
for ($i = 0; -5 ; $i++)
{
print"i";
if ($i == 3)
break;
}
?>
<?php
for ($i = 0; -5 ; $i++)
{
print"i";
if ($i == 3)
break;
}
?>
Answer & Solution
Correct Answer:
Option
B
The break statement after breaks the loop after i=3,does not print anymore.
Join the Discussion
Login to post a comment or share your explanation.
Login