is there a way to find all the folders in a directory and then have them placed into a dropdown box????
although ok at php. this is what i thought of. doesn work though. :S
<select name='folder' class='dropdown'>
<?php
$handle = @opendir( '../folders/' );
$matches = array();
if ( $handle != '' ) {
while ( $file = readdir($handle)) {
$matches[] = $file;
}
}
for($i = 0, $j = count($matches); $i < $j; $i++) {
echo "<option value='", $matches[$i] ;
echo "'></option>";
}
?>
</select>
anyone have any ideas?
finding folders.
Moderator: General Moderators
i have been looking for the same thing, and found this just then :
http://www.g2k.dk/stuff/txt/directory/
http://www.computing.net/programming/ww ... /8345.html
you may be able to use this function to do just what you need. I know it's gonna work for me (having to wait at school for my class to begin/end before i can get home and try it out to be sure though..).
http://www.g2k.dk/stuff/txt/directory/
http://www.computing.net/programming/ww ... /8345.html
you may be able to use this function to do just what you need. I know it's gonna work for me (having to wait at school for my class to begin/end before i can get home and try it out to be sure though..).