Re: [PHP] Reading Directory in reverse

2003-01-23 Thread Marek Kilimajer
It does not read it in reverse alphabetical order, but in the order it is listed on the filesystem, which happens to be in reverse alphabetical order. If you need it ordered, use $files=array(); if (!($dp = opendir($default_dir))) die("cannot open $default_dir"); while($file = readdir($dp))

Re: [PHP] Reading Directory in reverse

2003-01-22 Thread Jim Lucas
you'll have it. Jim - Original Message - From: "Bob Irwin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 22, 2003 3:03 PM Subject: [PHP] Reading Directory in reverse > Hi Guys, > > Does anyone happen to know why the below

[PHP] Reading Directory in reverse

2003-01-22 Thread Bob Irwin
Hi Guys, Does anyone happen to know why the below code reads the directory in reverse alphabetical order? Not a major problem - easy enough to whack it in an array and sort it, but annoying nonetheless. $default_dir = "../screenshots"; if (!($dp = opendir($default_dir))) die("cannot open $defa