Q. What is the result of the following PHP code?
Code:<?php
$names = array("alex", "jean", "emily", "jane");
$name = preg_grep("/^e/", $names);
print_r($name);
?>
β
Correct Answer: (C)
Array ( [2] => emily )
Explanation: The built-in function preg_grep() returns an array containing only items from the input that match the given pattern.