Home » PHP » PHP For Loops » Question
  1. What will be the output of the following PHP code ?
    <?php
    for($g = 0; $g < 15; $g++)
    {
    for($h = $g; $h > $g; $g--)
    print $g;
    }
    ?>
    1. Nothing
    2. Error
    3. 012345......infinite time
    4. 543210......infinite time
    5. None of these
Correct Option: A

The second loop does not execute as the check condition is always false.



Your comments will be displayed only after manual approval.