Home » PHP » PHP For Loops » Question
  1. What will be the output of the following PHP code ?
    <?php
    $emp = array("Ajit", "Ats", "Aju","Rahul");
    for ($p = 0; $p < count($emp); $p++)
    {
    if ($emp[$p] == "Rahul")
    continue;
    printf ($emp[$p]);
    }
    ?>
    1. AjitAtsAjuRahul
    2. AjuAtsRahul
    3. Error
    4. Nothing
    5. AjitAtsAju
Correct Option: E

Only the Shrek is skipped due to the continue statement.



Your comments will be displayed only after manual approval.