What is the use of in_array() function in PHP?

If you want to check particular value exists in an array or not,then you can use in_array() function.

Example:

Output:

PHP exists