Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.
Im trying to list the contents of a directory sorting the file by the time they were uploaded...so i used the modified time to base this.
My theory would be to set and array of the files and set the key to be the filetime() of the file. then do a krsort() to sort by unixt time stamp in descending order...
is this an appropriate step in sorting files by the time they were uploaded?
mMm, your way seems more sensible though. But I rarely have any luck working with files - most of the time. So when uploaded, I'd register the filename into a table in the database then when sorting, I call "ORDER BY id DESC".