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

The loop ends when number becomes 0.



Your comments will be displayed only after manual approval.