1.
What will be the output of the following PHP code ?
<?php
for ($count = 0; $count < 3;$count++);
{
    print "hi";continue;print "hello";
}
?>

2.
What will be the output of the following PHP code ?
<?php
for ($count = 0; $count<3;$count++);
{
    print "hi";break;print "hello";
}
?>

3.
What will be the output of the following PHP code ?
<?php
for(++$i; ++$i; ++$i)
{
    print $i;
    if ($i == 4) 
        break;
}
?>

4.
What will be the output of the following PHP code ?
<?php
for ($i = 0;$i = -1;$i = 1)
{
    print $i;
    if ($i != 1) 
	break;
}
?>

5.
What will be the output of the following PHP code ?
<?php
for(;;)
{
   print "10";
}
?>

Read More Section(Control Structures(Loop in PHP))

Each Section contains maximum 70 questions. To get more questions visit other sections.