How can I get all sub-directories of a given directory without files, .(current directory) or ..(parent directory) and then use each directory in a function?
.
..
you can use glob() with GLOB_ONLYDIR option
GLOB_ONLYDIR
or
$dirs = array_filter(glob('*'), 'is_dir'); print_r( $dirs);
1.4m articles
1.4m replys
5 comments
57.0k users