Just store each $file into an array ($array[] = $file)
and the sort($array).  Works dandy =>

Ben

Quoting kmurrah <[EMAIL PROTECTED]>:

> Greetings.
> 
> I need to read the contents of a directory, sort
> it alphabetically, and
> display it ....
> 
> i'm doing find on the reading and displaying,
> but can someone help me with
> the sort?
> 
> 
> $dir = opendir(".");
> 
> while ($file=readdir($dir)) {
> 
> 
>       if($file!= "." && $file != "..")
>       {
>       echo("$file<br>");
>       }
> }
> 
> 
> 
> 
> 
> thanks,
> 
> kennm
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to