Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

  1. What will be the output of the following PHP code ?

    <?php

    $i = 2;

    while (++$i)

    {

    while ($i --> 0)

    print $i;

    }

    ?>

  2. A.

     210

    B.

     10

    C.

     no output

    D.

     infinite loop

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    The loop ends when i becomes 0.


Be The First To Comment