PHP Manualin_array(PHP 4, PHP 5) in_array — Checks if a value exists in an array Description
Searches Parameters
Return Values
Returns Changelog
Examples
Example #1 in_array() example
<?php The second condition fails because in_array() is case-sensitive, so the program above will display: Got Irix
Example #2 in_array() with strict example
<?php The above example will output: 1.13 found with strict check
Example #3 in_array() with an array as needle
<?php The above example will output: 'ph' was found 'o' was found See Also
![]() |
PHP-Index
New Tutorial entries
|