see if not in array php code example
Example 1: check if array value exists in another array php
$result = !empty(array_intersect($people, $criminals));
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))