This is a discussion on how would I go about getting directory list to appear in a drop down menu within the PHP Language forums, part of the PHP Programming Forums category; I'm working on a website for a friend, and I want to let him select an image from a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm working on a website for a friend, and I want to let him select an
image from a dropdown menu for his posts. how would I go about getting that to work? I know you can echo the directory contents by using `ls -al` could this be done the same way? |
|
|||
|
behindspace wrote:
> I'm working on a website for a friend, and I want to let him select an > image from a dropdown menu for his posts. how would I go about getting > that to work? I know you can echo the directory contents by using `ls -al` > could this be done the same way? $handle = opendir($dir); while($file = readdir($handle)) { if(ereg("\.(jpg|jpeg|gif)^, $file)) print "$file<br>"; // work with the data like You want to } -- Sincerly Kim Madsen Systemdeveloper / ComX - http://www.comx.dk |