Nein die aufgabe mit readdir ist ja unsotiert wie kann ich das Verzeichnis sortieren.
dann sach das doch :-))
Das Manual (http://www.php.net/manual/de/function.readdir.php) birgt wahre Wunder, z.B.
function GetDirArray($sPath)
{
//Load Directory Into Array
$handle=opendir($sPath);
while ($file = readdir($handle))
$retVal[count($retVal)] = $file;
//Clean up and sort
closedir($handle);
sort($retVal);
return $retVal;
}
Grüße
Andreas