Prova con una cosa del genere:
Codice PHP:
<?php
if ($handle = opendir('/images/banner')) {
echo "Handle della directory: $handle\n";
echo "File:\n";
echo "<table border=\"0\">\n<tr>\n";
while (false !== ($file = readdir($handle))) {
echo "<td><img src=\"$file\"></td>\nIl link è:\n<textarea cols=\"10\" rows=\"3\">$file</textarea>";
}
echo "</tr>\n";
echo "<tr>\n";
while ($file = readdir($handle)) {
echo "<td><img src=\"$file\"></td>\nIl link è:\n<textarea cols=\"10\" rows=\"3\">$file</textarea>";
}
echo "</tr>\n</table>";
closedir($handle);
}
?>