View Single Post
Old 06-28-2009, 08:36 PM   #1 (permalink)
Peuplarchie
The Acquainted
 
Peuplarchie's Avatar
 
Join Date: May 2008
Location: Québec
Posts: 104
Thanks: 10
Peuplarchie is on a distinguished road
Application 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 !
Peuplarchie is offline  
Reply With Quote