The array_search() function, like in_array(), searches for a key value in an array. If the value is found, the key of the matching element is returned. If not found, returns false.
The array_search() function is the same as in_array(), searching for a key value in the array. If the value is found, the key of the matching element is returned. If not found, returns false.
If the third parameter strict is specified as true, the key name of the corresponding element will only be returned if the data type and value are consistent
array_search(value,array,strict)
Example