To display a list of files within a directory using PHP you need to use opendir() and readdir(). Below is a function that will return the list of files and remove the . and .. from the listing.
You might run into trouble trying to find the correct full path of the images. For example in a windows hosting environment the path could be (c://blah/blah), in a Linux environment it could be (/var/www/blah/blah).
To find the exact path for your environment use phpinfo(). Once you have the php info look for the DOCUMENT_ROOT entry.