But one question is: Why does it need to be a table? This ain’t abular data and images align themselves horizontally anyway so no need for a table (with just one row and an endless amount of columns). You’ll just have to put the images and space them with on line of CSS. I don’t even think if you need an automatic script for that (and I don’t know any) but a regular HTML editor with search and replace function might do it as well.
The automation needs to be server-side. Might help:
PHP Code:
<table> <tr> <?php $dir = 'images/'; // Base directory
// Open a known directory, and proceed to read its contents if (is_dir($dir)) // If directory exist { if ($dh = opendir($dir)) // If assignment successful { while (($file = readdir($dh)) !== false) // While there's still a file { if($file!='.'&&$file!='..') // I don't want to see the gibberish echo "<td><img src='$dir$file' alt='$file'></td>"; // Echo the image inside a <td> element } // End of the while loop closedir($dh); // Close the directory connection } // End of the if statement } // End of the if statement ?> </tr> </table>