Sail E0 Webinar
Question
What will be the output of the following PHP code?
< ?php
$state = array ("Karnataka", "Goa", "Tamil Nadu",
"Andhra Pradesh");
echo (array_search ("Tamil Nadu", $state) );
?>
Options:
A .  True
B .  1
C .  False
D .  2
Answer: Option D


The array_search() function searches an array for a specified value, returning its key if located and FALSE otherwise.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers