Reply to Re: beginner question: directory handling & sorting

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация