how to check if item in array php code example
Example 1: what is use of in_array() function in php
The in_array() function is an inbuilt function in PHP.
The in_array() function is used to check whether a given value exists in an array or not.
It returns TRUE if the given value is found in the given array, and FALSE otherwise.
Example 2: in_array
in_array ( mixed $needle , array $haystack [, bool $strict = FALSE ] ) : bool