"> 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 ($p = 1; $p < 10; ++$p)
    {
    print "*";
    }
    ?>
    1. *********
    2. ******
    3. ***
    4. Error
    5. Nothing
Correct Option: A

Loop runs from 1 to 9 i.e 9 times.



Your comments will be displayed only after manual approval.