-
What will be the output of the following PHP code?
$cars = array("Datsun", "Jeep", "Lada", "Spyker");
$car = preg_grep("/^L/", $cars);
print_r($car);
?>
-
-
Array
(
[2] => Lada
) -
Array
(
[1] => Jeep
) -
Array
(
[0] => Datsun
) -
Array
(
[3] => Spyker
) - None of these
-
Correct Option: A
This function is used to search an array for foods beginning with s.