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

Wrong syntax for for loop.



Your comments will be displayed only after manual approval.