Thread: PHP Help Needed
View Single Post
  #27  
Old December 6th, 2003, 09:57 AM
Asmala's Avatar

Asmala Asmala is offline
Captain
 
Join Date: Nov 2002
Location: Finland
Posts: 864
Thanks: 0
Thanked 0 Times in 0 Posts
Asmala is on a distinguished road
Default Re: PHP Help Needed

Quote:
Originally posted by Imperator Fyron:
I fail to see a problem with this line:

array_multisort($fileArray, SORT_ASC, SORT_STRING);
You have a wrong parameter. Array_multisort requires an array, not a multi-dimensional array. You have to modify $fileArray a bit. Now it's $fileArray[$counter][0], change it to $fileArray[0][$counter]. Then you can sort it easily. For example:

array_multisort($fileArray[0], SORT_ASC, SORT_STRING);//sorts by names.

Have you noticed when you use $file = readdir($dir_handle) you get first "." and then ".." and but then real filenames.
__________________
'The surest sign that there is intelligent life elsewhere in the universe is that none of it has tried to contact us.' Calvin and Hobbes
Are you tough enough to be the King of the Hill?
Reply With Quote