opendir(), readdir() question..

From: Date: Thu, 29 May 2003 18:12:21 +0000
Subject: opendir(), readdir() question..
Groups: php.general 
Request: Send a blank email to php-general+get-149463@lists.php.net to get a copy of this message
Hi all, How can i do for the moment i open and list all file there, display in the browser the order of this files by name ?. I have this code: <?php $handle=opendir('.'); while ($file = readdir($handle)) { if ($file != "." && $file != "..") { echo "$file\n"; } } closedir($handle); ?> And the result send to the browser, is the files, but witouth any order. Thanks for reading, your help is greatly appreciated! -- Esteban Fernández T.

« previous php.general (#149463) next »