Directories only

<?php
$dirFiles=glob($myDir. '*', GLOB_BRACE);
$fileList='';
foreach($dirFiles as $dirFile){
$list=$list.$dirFile. '<br>';
}
echo $list;

The code above produces the result below.

I like to produces the result below.

glob has a flag for ONLYDIR

and you don’t need GLOB_BRACE 'cos you’re not using braces.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.