RE: [PHP] sorting files by date
| From: | Martin Towell | Date: | Wed, 12 Nov 2003 01:14:18 +0000 |
| Subject: | RE: [PHP] sorting files by date | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169220@lists.php.net to get a copy of this message | ||
surely sort() would do the trick?
Martin
> -----Original Message-----
> From: Justin French [mailto:justin@indent.com.au]
> Sent: Wednesday, 12 November 2003 12:13 PM
> To: php
> Subject: [PHP] sorting files by date
>
>
> Hi,
>
> I have a dir of files saved in the following format:
> YYYY-MM-DD.mp4. I
> know how to get the file names into an array, but I don't know how to
> sort the array so that the files appear in date order. My
> guess was to
> use strtotime() to get the date into a timestamp, then sort on the
> timestamp, but there MUST be an easier way :)
>
> I've read through most of the array part of the manual, but can't see
> what I need.
>
>
> Justin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> __________ Information from NOD32 1.552 (20031107) __________
>
> This message was checked by NOD32 for Exchange e-mail monitor.
> http://www.nod32.com
>
>
>
>