How to check if a file doesn't exist in any directory, add into the $notexists
array.
foreach($files as $file){
foreach ($folders as $this_folder) {
if (file_exists($this_folder.$file)) {
$exists[] =$file;
continue;
}else{
// What to do if file is not exist in any directory, add into array.
$notexists[] = '';
}
}