On 09-Jul-01 Andrew Chase wrote:
> Try reading the directory contents into an array, sorting it, *then*
> outputting the contents of the array:
>
> $dir = opendir(".");
>
> $dirlist = array();
> $index = 0;
> while($file = readdir($dir) && $file != "." && $file != ".."){
> $dirlist[$index
Try reading the directory contents into an array, sorting it, *then*
outputting the contents of the array:
$dir = opendir(".");
$dirlist = array();
$index = 0;
while($file = readdir($dir) && $file != "." && $file != ".."){
$dirlist[$index++] = $file;
}
sort($dirlist);
foreach($dirlist
2 matches
Mail list logo