I have the following code. I'm looking to do what's in the comment which is to populate a selectbox with a name of directories. How would I do that?
$path = 'repository/' . $name[0];
$results = scandir($path);
foreach ($results as $result) {
if ($result === '.' or $result === '..') continue;
if (is_dir($path . '/' . $result)) {
//extract directory names and populate selectbox
}
}