Possible Duplicate:
Get the Files inside a directory
Is there a function that can be used to get the contents of a directory (a photo gallery directory for example)?
I’m trying to save time on a project by automating a photo gallery based on which files are available.
You can either use the DirectoryIterator:
or alternatively glob():