Ok, fatto.
Ho riadattato la mia funzione in questo modo:
Codice PHP:
function HTML_Dir_OptionTree($dir, $sel_subpath = '', $root = '',$depth = 0, $parent_last=[])
{
$children=array();
$dir=realpath($dir);
if ($root=='') $root= preg_replace('/\/+/', '/', $dir.'/');
$list = scandir($dir);
foreach ($list as $obj) if (is_dir($dir.'/'.$obj) && is_readable($dir.'/'.$obj) && !is_link($dir.'/'.$obj) && $obj!=='.' && $obj!=='..') {
$item['name']=$obj;
$item['realpath']=$dir.'/'.$obj;
$item['subpath'] = preg_replace('/^'. preg_quote($root, '/') . '/', '', $item['realpath']).'/';
$children[]=$item;
}
foreach ($children as $key => $child)
{
if ($depth>0)
foreach ($parent_last as $is_last)
$p_branches.=($is_last ? ' ' : ' │ ' );
$symbol = $p_branches.' '.(($key == (count($children)-1)) ? '└' : '├').'─▸';
$result .= '<option value="'.$child["subpath"].'" '.($child["subpath"]==$sel_subpath ? 'selected':'').'>'.$symbol.$child["name"].'</option>'."\n";
$parent_last_new=$parent_last;
$parent_last_new[]=(($key == (count($children)-1)) ? 1 : 0);
$p_branches='';
$result.=HTML_Dir_OptionTree($child['realpath'], $sel_subpath, $root, $depth+1, $parent_last_new);
}
return $result ? $result : null;
}
Si usa cosi':
PRIMO parametro ($dir): percorso da visualizzare
SECONDO parametro ($sel_subpath): directory [option] selezionata (richiede SLASH finale).
Codice PHP:
<style>
option {font-family:monospace,monospace; font-size:12px}
</style>
<select name="myselect">
<? echo HTML_Dir_OptionTree('mio/percorso', 'directory/selezionata/'); ?>
</select>
Spero che vi possa essere utile 
Allego uno "shot" di esempio