View Single Post
  #4 (permalink)  
Old 07-12-2008, 11:57 AM
DaveSawers's Avatar
DaveSawers DaveSawers is offline
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 390
DaveSawers RepRank 1
Default Re: Help -- SELECT Function PHP Script

You can use scandir to return the names of all the files in the directory: PHP: scandir - Manual

and then for each file you can get the last modified date and time using filemtime: PHP: filemtime - Manual

Put the filenames in one array and the modified dates and times in a second array. Sort the modified times using asort: PHP: asort - Manual which keeps the indexes in the original order (or use arsort if you want them in reverse order). Then step through the sorted modified times array, pulling out the keys and use the keys to access the filenames array. The filenames will then be accessed in DTM order.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote