Re: readdir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 15 September 2006 14:18, Toby Osbourn wrote:

> I suppose my question put simply is, what is the default ordering of
> directories when PHP uses the readdir method? And is there anyway to force
> a specific ordering to the directories before PHP searches down them?

If you're on PHP 5, look at scandir().  It gives you an array of all of the 
files/directories in a given directory, which you can then sort with sort() 
or usort() or whatever.  If you're on PHP 4, there's a backport of it in 
PEAR::PHP_Compat that doesn't actually require the rest of PEAR to 
function. :-)

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux