Examveda
Examveda

What will be the output of the following PHP code ?
<?php
$a = array("a" => "Jaguar", "b" => "Land Rover", "c" => "Audi", "d" => "Maseratti");
echo array_search("Audi", $a);
?>

A. a

B. b

C. c

D. d

Answer: Option C

Solution(By Examveda Team)

The array_search() function searches for the element and returns the key of that element.

This Question Belongs to PHP >> Arrays

Join The Discussion

Related Questions on Arrays