Please Help! Sorting the results of directory indexing

From: Date: Thu, 29 Nov 2001 09:31:57 +0000
Subject: Please Help! Sorting the results of directory indexing
Groups: php.general 
Request: Send a blank email to php-general+get-75999@lists.php.net to get a copy of this message
Hi all, I have a script that lists directory contents but I'm trying to put the results in reverse order. I've tried the arsort & array reverse but have so far been unable to get them working, can somebody please help me! Here's a look at my script: ==================================================== <?
       // print the current directory in unordered list
       print("<UL>\n");
       // get each entry within the directory & return to user with the link
       $myDir = dir(".");
       while($FileName = $myDir->read())
       {
               if ($FileName != "." && $FileName != ".." && eregi (".*\.htm",$FileName)){
                       print("<LI><a href=$FileName>$entryName \n</a>");
               }
       }
       // close directory
       $myDir->close();
       print("</UL>\n");
?> ==================================================== _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

« previous php.general (#75999) next »