Hi Jas,
if I understood your question right, you can solve your problem best with
something like the following:
<?php
$i=0; // counter
$files = array(); // array to store directory content
// open directory
$dir = opendir("PATH_TO_DIR");
// loop through directory and put filenames into an array
while ($file = readdir($dir)) {
$files[$i] = $file;
$i++;
}
// close directory
closedir($dir);
// now do something reasonable with your array
?>
Bob
"Jas" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ok here is what I would like to accomplish, I am sure someone has done
> something like this but I need an example to go from since I am still not
> able to write php from scratch...
> I need to write a function to count the contents of a directory, like the
> file names and place them into an array so I can use a select box to
select
> the file path in which I would like to save to database, like I said I
don't
> want someone to do it for me, I just need a resource such as a tutorial or
> example to run with. Thanks a ton,
> Jas
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php