$path = "/images/"; //path from root
$dir_handle = @opendir($path) or die("Unable to open $path");
while ($file = readdir($dir_handle)) {
if($file == "." || $file == ".." || $file == "index.php" )
continue;
echo '
'; //formatting this is up to you
}
closedir($dir_handle);