php if string in list code example
Example 1: in_array
<?
in_array("Irix", $os);
?>
Example 2: php check if item in array
$allowedFileType = ['application/vnd.ms-excel','text/xls','text/xlsx','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
if(in_array($_FILES["file"]["type"],$allowedFileType))
Example 3: in_array
in_array ( mixed $needle , array $haystack [, bool $strict = FALSE ] ) : bool