Hi,
I want to be able to read a list of images from a directory,put them in to a table 3 columns wide and then create a thumbnail for the image so people can click the thumbnail and see the full picture. I cant get it working as it prints the same picture in each column until it goes on to the next row. What am i doing wrong.
this is my code:
<?
$dir = opendir(".");
while($file=readdir($dir)) {
?>
</p>
<table width="100%"><tr>
<td width="31%">
<div align="center"><font size="2">
<? echo ("<a href=javascript:popUp('$file')> <img src=$file width=100 height=80 border=0></a> ");?></font></div></td>
<td width="33%">
<div align="center"><font size="2">
<?echo ("<a href=javascript:popUp('$file')> <img src=$file width=100 height=80 border=0></a><BR> ");?></font></div></td>
<td width="36%">
<div align="center"><font size="2">
<? echo ("<a href=javascript:popUp('$file')> <img src=$file width=100 height=80 border=0></a><BR> ");?></font></div></td>
<? } ?>
</tr>
</table>