[thelist] PHP directory sort by date

Rich Gray rich at f1central.net
Wed Jan 22 08:09:01 CST 2003


have you thought of shelling out to the OS and running ls -t (or dir /o:d
for Win32) and then parsing the output?

Rich
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Daniel Fascia
Sent: 22 January 2003 13:39
To: thelist at lists.evolt.org
Subject: [thelist] PHP directory sort by date


Trying to scan a directory and its subdirs for all files and grab them into
an
array ordered by time and date <phew!!>

Can anybody shed light on the best approach??

Ive considered two options but both seem difficult to implement:
1) using the dir() class and praying it spits out results in date order
2) using readdir() and then making a date sort function for the array I
store.
But god only knows how to write a date sort function...

Help!!!

------------------------
- Daniel Fascia -

18 Gayfield Sq,
Edinburgh,
EH13NX

+447971541842 (mobile)
------------------------




More information about the thelist mailing list