Hi.
I am trying to make some kind of a image gallery.
I make my script loop out files from a spectified folder and put them into a table.
Now i want to put each picture into it's own colum. Example:
| 1.jpg | 2.jpg | 3.jpg |
| 4.jpg | 5.jpg | 6.jpg |
The script is there: http://nffa.stebbiv.ath.cx/myndasafn/yfirlit.php?mappa=amiweber
And here's the code:
<?
$fjoldi = -1;
$Open = opendir("files/$_GET[mappa]");
while ($Files = readdir ($Open)) {
$Filename = "files/$GET[mappa]/" . $Files;
if (is_file ($Filename)) {
$fjoldi = $fjoldi + 1;
?>
<tr><td><div align="center"><img src="<? print ("thumbnail.php?img_name=files/$GET[mappa]/$Files&breidd=200"); ?>"></div></td>
<td><div align="center"><img src="<? print ("thumbnail.php?img_name=files/$GET[mappa]/$Files&breidd=200"); ?>"></div></td>
<td><div align="center"><img src="<? print ("thumbnail.php?img_name=files/$GET[mappa]/$Files&breidd=200"); ?>"></div></td></tr>
<?
}
}
closedir ($Open)
?>
</table>
<br>
Fjöldi mynda: <? print("$fjoldi"); ?>