|
Posted by Schraalhans Keukenmeester on 03/27/07 21:20
I'm having a hard time getting to grips with this function.
I have an array shaped like this:
$dircontents[0]['filename'] ='index.html'
$dircontents[0]['owner'] = 'www'
$dircontents[0]['group'] = 'www'
$dircontents[0]['type'] = 'file'
$dircontents[1]['filename'] ='images'
$dircontents[1]['owner'] = 'www'
$dircontents[1]['group'] = 'www'
$dircontents[1]['type'] = 'dir'
etc.
'type' can be any of {dir,file,link}
How do I get the array sorted, alphabetically, first by type, then filename?
My attempts sofar have lead to a seemingly unsorted array, not even
close to anything recognizable. Is array_multisort() even what I should
be looking for?
Help appreciated!
Sh.
Navigation:
[Reply to this message]
|