The script below works great, however it displays 396 thumbnails. What I would like to do is organize the look and feel better. I want o be able to display the thumbnails in 3 columns rather then scrolling down for ever looking at all the pictures. So how would I make it to break into 3 columns??
<html>
<head>
<title>Browse</title>
</head>
<body>
<h1>Browsing</h1>
<?
$current_url = "http://www.domain.com/pics/thumb/";
$current_dir = "/home/account/public_html/pics/thumb/";
$dir = opendir($current_dir);
$i = 0;
while ($file = readdir($dir))
{
$i++;
$newFile = preg_replace("/tn_/i",'',$file);
echo "<a href=http://www.domain.com/pics/$newFile><img src=$current_url$file /></a>";
echo "<br>$file<br>";
}
echo "TOTAL FILES: $i";
echo "<hr><br>";
closedir($dir);
?>
</body>
</html>