06-28-2009, 09:36 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: May 2008
Location: Québec
Posts: 103
Thanks: 10
|
Listing folders in list box, folder only, recursively
Good day to you all,
I'm working on a piece of code which list directory into a dropdown box.
No problem, with that :
PHP Code:
<p>List Box - Single Select<br> <select name="listbox" size="1"> <option selected>Click here to see them by themes</option> <?PHP
if ($handle = opendir('themes/')) { while (false !== ($file = readdir($handle))) { if ($file != '.' && $file != '..') { $fileName = str_replace('.mov', '', $file); echo '<option value="' . $file . '">' . $fileName . '</option>'; } } closedir($handle); }
?>
</select> </p>
Now what I would like to do is :
1- Read the directory recursively .
Thanks !
__________________
That's why we are not alone on earth... let's build !
|
|
|
|