On 15/04/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
On Sun, 2007-04-15 at 20:36 +0100, Alister Bulman wrote:
> On 15/04/07, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > 2007. 04. 15, vasárnap keltezéssel 21.20-kor Otto Wyss ezt írta:
> > > I want to sort directories according there modification time and thought
> > > accociative arrays would be perfect. But when I add an element like

> Better, I think, to put the unique thing - the name, as the index.
> Two directories may have the same modification time.
> $dirs[$d] = filemtime($d);

Has he even retrieved the directories in sorted order by modification
time? If not he still needs to sort.

Then he'll need an asort($dirs);  They would not have come in any
particular order, so you have to sort them for whatever you need
anyway.

Alister

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to