
December 7th, 2003, 02:56 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Asmala:
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. Yep, it's the current directory "." and the directory above ".."
as in ms dos;
CD..
|