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
How does csrf token work?
How to get the length of string?
What is the functionality of the functions strstr() and stristr()?
What is implode() in php?
Which function can be used to delete a file?
Does php have a future?
Which function is used to strip whitespace?
A process is identified by a unique___
What is the use of explode() function?
What is a composer in PHP?
Explain me what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
What is return value in php?
Which php framework is best for web development?
How can I prevent sql-injection in php?
Explain object-oriented methodology in php?