PHP: array_search() function

The array_search() function is used to search the array against the given value. The function returns the first corresponding key if successful.

Example -

Example -