"> What will be the output of the following PHP code ?<?phpfor

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

The condition of the loop is always false 0.



Your comments will be displayed only after manual approval.