Home » PHP » PHP Arrays » Question
  1. What will be the output of the following PHP code?
    <?php
    $Flower = array("Rose", "Lily", "Sunflower");
    echo "I like " . $Flower[0] . ", " . $Flower[1] . " and " . $Flower[2] . ".";
    ?>
    1. Error
    2. Nothing
    3. Rose Lily Sunflower
    4. I like Rose, Lily and Sunflower.
    5. None of these
Correct Option: D

The array() function is used to create an array.



Your comments will be displayed only after manual approval.