I was wondering if there is a php code which will get every name of every folder in a directory. For example.
Root directory/public_html/modules and inside modules there will be folders such as News, Menu, Shoutbox, Gallery etc etc. I want to get the name of each folder in the modules directory so I can put it in a select list.
Nevermins the directory I showed you it was just an example, I just need the code and I will modify it myself accordingly.
Cheers
insight
How to get the name of every folder in a directory?
Moderator: General Moderators
Re: How to get the name of every folder in a directory?
You could look into glob() and is_dir().
Re: How to get the name of every folder in a directory?
Just realised, I don't need it
I have all the folders in a database.
EDIT: But it may help in the future so thanks for your input
EDIT: But it may help in the future so thanks for your input