how to get all nextchild directory in php code example Example: php list directories $dir = '.'; $directories = glob($dir . '/*', GLOB_ONLYDIR);