<?php
$directories = glob($somePath . '/*' , GLOB_ONLYDIR);
print_r($directories);
?>
OUTPUT:
Array ( [0] => /bin [1] => /boot [2] => /cgroup [3] => /dev [4] => /etc .... )
The above is a sample output. The above code is used to print the directories using php code.
|