toArray($value['path']); $header = $excelHeaderArray[0][0]; if($diff = array_diff($toCheck,$header)) $fail("This sheet doesn't contain one of the following: ".implode(', ',$diff)); }catch(NoTypeDetectedException $e){ $fail($e->getMessage()); } } }