what is array search ?
Array search returns the corresponding key if search is successful and Searches the array for a given value.
You can take reference form below example.
<?php
//firstly create a array
$employeName=array("1"=>"Jorden","2"=>"Roy","3"=>"Mac");
// here $employeName is a variable in which store all array data
echo array_search("Roy",$employeName);
// here call the array_search() for find the value in array
?>
Output will come
2
here 2 is corresponding key because search is successful.
0 Comment(s)