Possible Duplicate:
Get the hierarchy of a directory with PHP
Getting the names of all files in a directory with PHP
I have seen functions to list all file in a directory but how can I list all the files in sub-directories too, so it returns an array like?
$files = files("foldername");
So $files
is something similar to
array("file.jpg", "blah.word", "name.fileext")
PHP documentation: