I am using the below function to list directories and subdirectories
function listFolderFiles($dir){ $ffs = scandir($dir); unset($ffs[array_search(\'.\',