View Single Post
  #1 (permalink)  
Old 06-28-09, 04:37 PM
peuplarchie's Avatar
peuplarchie peuplarchie is offline
Newbie Coder
 
Join Date: Nov 2008
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
Post 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 !
Reply With Quote