Hi Graham. Now page wont load...
Code:
<?php
foreach($files as $file)
{
$fullname = str_replace('_thumbnail.jpg', '',$file);
$images = "img/"; # Location of small versions
$big = "img/"; # Location of big versions (assumed to be a subdir of above)
$cols = 4; # Number of columns to display
if ($handle = opendir($images)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != rtrim($big,"/")) {
$files[] = $file;
}
}
closedir($handle);
}
$colCtr = 0;
echo '<table width="100%" cellspacing="0" cellpadding="0"><tr>';
foreach($files as $file)
{
if($colCtr %$cols == 0)
echo '</tr><tr><td colspan="2"></td></tr><tr>';
echo '<td align="center"><img src="' . $images . $file . '" /><br> '. $fullname . '</td>';
$colCtr++;
}
echo '</table>' . "\r\n";
?>