<html>
<body>
<table>
<?
$path = "/full/path/to/dir/";
$dir=opendir($path);
while ($file = readdir ($dir)) {
if ($file != "." && $file != ".." && eregi(".gif",$file)) {
echo "<tr><td><a href=\"$file\">View $file</a></td></tr>";
}
}
closedir($dir);
?>
</table>
</body>
</html>
will list *.gif files. just edit eregi(".gif",$file)) to suit your needs.