|
Posted by Rik on 08/15/06 23:13
Eric Capps wrote:
> I am trying to open a directory on a file server to populate a drop
> down menu. I've been able to do this, but the results are not sorted
> alphabetically. How would I go about this? I've looked at the php.net
> site on directory functions, but haven't found a solution that works.
> The sort() function seemed like it should, but it instead returned an
> error: sort() expects parameter 1 to be array, resource given.
>
> Any help would be appreciated.
0. you can't sort files, only the list of files.
1. read all the contents of the directory in an array.
2. sort the array
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|