* and then Justin French declared
> > How does php order these files if read from the directory and printed to
> > the screen? -- I need them in date order, do I need to sort them
> > somehow?
>
> There's an optional second parameter for asort() and rsort(), so check it
> out in the manual..
Justin French wrote
I think PHP reads them in date created order, or something else...
The order is not guarantied, it just happens to be so. I suppose most
filesystems return files
in the order they were added to the directory, but also reuse the space
left after deleting a
file.
--
P
on 28/11/02 12:01 AM, Nick Wilson ([EMAIL PROTECTED]) wrote:
> I have several directories filled with files written like this:
>
> * 02-09-19-filename.etc
> * 02-10-02-anotherfile.whatever
>
> How does php order these files if read from the directory and printed to
> the screen? -- I need
Yes, you do. Add each dir to an array, sort the array, then loop
through it printing the dirs out.
Nick Wilson wrote:
Hi all,
I have several directories filled with files written like this:
* 02-09-19-filename.etc
* 02-10-02-anotherfile.whatever
How does php order these files if read fr
Sent: Wednesday, November 27, 2002 8:02 AM
To: php-general
Subject: [PHP] sorting files in directory
Hi all,
I have several directories filled with files written like this:
* 02-09-19-filename.etc
* 02-10-02-anotherfile.whatever
How does php order these files if read from the directory and pr
Hi all,
I have several directories filled with files written like this:
* 02-09-19-filename.etc
* 02-10-02-anotherfile.whatever
How does php order these files if read from the directory and printed to
the screen? -- I need them in date order, do I need to sort them
somehow?
Many thanks...
6 matches
Mail list logo