just changed your code to read:
for($m=0; $m<count($filelist); $m++)
so the code is now:
$src="/path/to/dir";
$dp=opendir($src);
while($file=readdir($dp)){
if (($file!=".") && ($file!="..")) {
$filelist[]=$file;
}
}
echo ("<select name=\"select\"><br>");
for($m=0; $m<count($filelist); $m++){
echo "<option>$filelist[$m]</option><br>";
}
echo"</select><br>";
Thanks for the code!
still, why this doesn't work is beyond me!
foreach($filelist as $sorted);
echo "\n $sorted \n";