ExamVeda
Login
Home
This question belongs to PHP Arrays
Arrays
?

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) );
?>

Answer & Solution
Correct Answer: Option D
The array_search() function searches an array for a specified value, returning its key if located and FALSE otherwise.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.