0

I am running glob against a folder holding revisions, I would like it to order them ideally by modify date. If I have to I can work with alphabetically in Descending order.

Do I just go with filename

$files = arsort(glob("*.rev"));

or is there a better way that uses modify date?

Tyson of the Northwest
  • 2,086
  • 2
  • 21
  • 34
  • Use your glob list with [`array_map`](http://php.net/array_map), [**`filemtime`**](http://php.net/filemtime), [`array_combine`](http://php.net/array_combine), [`krsort`](http://php.net/krsort). – mario Aug 18 '15 at 00:47
  • I think I found what you're looking for here: http://stackoverflow.com/questions/124958/glob-sort-by-date –  Aug 18 '15 at 00:48
  • I think you may be right, http://stackoverflow.com/questions/124958/glob-sort-by-date is the better of the two duplicates. – Tyson of the Northwest Aug 18 '15 at 00:56

0 Answers0