Answer Posted / binu.v.pillai
It will search a particular value in an array and if it
find that , it will return corresponding index
<?php
$fruitArray = array(0 => 'orange', 1 => 'apple', 2
=> 'mango', 3 => 'grapes');
$key = array_search('apple', $fruitArray); // $key = 1;
$key = array_search('orange', $fruitArray); // $key = 0;
?>
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
What is Mcrypt used for?
What is the empty function?
Tell me in php, objects are they passed by value or by reference?
What is php trait?
How are sessions maintained?
What is the use of namespace in php?
What are the final class and final method?
Tell us why did you choose this particular career path?
How to receive a cookie from the browser?
How to repeat a string to a specific number of times in php?
What is url encoding and decoding in php?
Is php 5 still supported?
How do you compare strings in java?
How to find current date and time?
What is session in c#?