The array_search() function used for searches the value and returns the first occurence key in an array.
Syntax
Example
$array=array("a"=>"ram","b"=>"shyam","c"=>"ravi");
echo array_search("shyam",$array);
Output
b
Copyright ©2022 coderraj.com. All Rights Reserved.