Recursive glob?

Good day to you all,
is there a way that I can use glob recursive ly in the following code ?



<?PHP
foreach(glob('Photos/*', GLOB_ONLYDIR) as $dir) {
  echo '<b>'.$dir.'</b><br>';
}  
?>


Thanks!

Yes, you could write a recursive function.

But you don’t need to


$it = new RecursiveIteratorIterator(
    new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST
);
foreach($it as $filename => $splFileObj) {
    if ($splFileObj->isDir()) {
        echo "$filename\
";
    }
}

:eek2: