Ok so I am using this with a dropdown... It works if there is just one file name (i.e. dev) it will read that dir but if I do ./theme it doesn't work please help.
PHP Code:
if ($handle = opendir('../theme')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$opt .= "<option value='".$file."'>".$file."</option>";
}
}
closedir($handle);
}