Web code snippets
PHP: Get the contents of a directory and display an alphabetical list of thumbnails:
if ($handle = opendir('path')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<a href=\"{path/$file\n\">
<img src=\"path/$file\n\" alt=\"\" />
</a>";
}
}
closedir($handle);
};
