"> <?phpfunction car(){ $car = array("Jeep", "Datsun",

Home » PHP » PHP Functions » Question
  1. <?php
    function car()
    {
    $car = array("Jeep", "Datsun", "Lada", "spyker");
    foreach ($car as $val)
    {
    echo "$val\n";
    }
    }
    car();
    ?>
    1. Jeep
      Datsun
      Lada
      spyker
    2. Datsun
      Lada
      spyker
    3. Error
    4. Nothing
    5. None of these
Correct Option: A

For each function causes the program to loop through each array value once.



Your comments will be displayed only after manual approval.