foreach($aFolders as $sFolder){ if (! is_dir($sFolder)){ print $sFolder; } }