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
Tell me how to create a text file in php?
How to download and install php on windows?
What is csrf cookie?
Why do we use htaccess and where?
What is the php function that removes the last element of the array and returns it?
What is "print" in php?
How values in arrays are indexed?
What is the best website to learn php?
Explain some most commonly use string functions in php?
Where is the submitted form data stored?
Tell me can the value of a constant change during the script's execution?
What is exception handling in php?
Which php function will attach one file to another?
Explain briefly about a search-friendly site looks like?
What is the difference between Split and Explode in PHP?