home array[1=>mark if (is_dir($newpath)) { echo "\nDirectory found at \n + $newpath"; $content=scandir1($newpath); }else{ //if newpath is not dir $mod_array[] = array( 'level'=>count($level)-1, 'path'=>$newpath, 'name'=>end($level), 'kind'=>'file', ); } } } closedir($dirlist); return $mod_array; } echo '
';
print_r(scandir1('.'));
echo '';
?>