I want to list all images in a dir on one page, and I want to list 10 at one row, each one in its own column. I've tried doing this:
<?php
$dir = "test";
$open = opendir($dir);
echo "<table border='1'>\n";
while($file = readdir($open))
{
$x++; // Number of images in the dir
for($num = 1; $num < 10; $num++)
{
echo "<tr>\n";
for($n = 1; $n < 10; $n++)
{
echo "<td>";
echo "<img src='".$dir."/".$file."' border='0'>\n";
echo "</td>\n";
}
echo "</tr>\n";
}
echo "</table>\n";
?>