in_array

PHP 4, PHP 5, PHP 7, PHP 8
in_array - Checks if a value exists in an array

Example #1 in_array with strict example

Result: 1.13 found with strict check
PHP Version:

Example #2 in_array with an array as needle

Result: 'ph' was found 'o' was found
PHP Version:

Example #3 in_array example

Result: Got Irix
PHP Version:


Example #4 of in_array

PHP Version:


Function in_array:

Arrays Functions

Most used PHP functions