Home » PHP » PHP While Loops » Question
  1. What will be the output of the following PHP code ?
    <?php
    $t = 20;
    do
    {
    $t++;
    }
    while ($t < 60);
    print $t;
    ?>
    1. Error
    2. 60
    3. Nothing
    4. 20
    5. None of these
Correct Option: B

The increment happens and then the check happens.



Your comments will be displayed only after manual approval.