List directories

<?php

foreach(glob($_SERVER['DOCUMENT_ROOT'] . '/pathtoparentdir/*', GLOB_ONLYDIR) as $dir){
$dir = basename($dir);
echo $dir . '<br>';
}

?>

0 Comments

You must be logged in to post a comment.