I'm on localhost, win 7, xampp
Need to create divs from all (and only) folders inside ../HOME
Originally, folders are sorted by name.
$arr = glob('../HOME/*', GLOB_ONLYDIR);
$cnt = '';
foreach($arr as $el){
$cnt .= "<div class = 'folder rfolder'>" . basename($el) . "</div>
";
}
echo $cnt;
Result - folders are sorted by the time created.
Tried - $arr = glob('../HOME/*', GLOB_ONLYDIR, GLOB_NOSORT)
and getting error - only two arguments allowed
.
How to get folders sorted originally - as inside source folder?