I am trying to do a simple image gallery with text underneath the
images. But when i go to the page using this code only one letter
shows up underneath the pic. any help is appreciated.
Nate
<html>
<head>
<title>Outdoor Pictures of Mine</title>
</head>
<body bgcolor="Black">
<div align="center">
<table width="70%" border="5" bordercolor="Gray" >
<tr>
<td colspan="200%" align="center" valign="bottom" bgcolor="White">
<div align="center"><font face="verdana" size="6" color="#003366">Some
Outdoor Pictures of Mine</font></div><br>
</td>
</tr>
</table>
</div>
<?php
$images = "image_gallery/"; # Location of small versions
$big = "big/"; # Location of big versions (assumed to be a subdir of above)
$cols = 2; # 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="3"><tr>';
foreach($files as $file)
{
if($colCtr %$cols == 0)
echo '</tr><tr><td colspan="2"><hr /></td></tr><tr>';
echo '<td align="center"><a href="' . $images . $big . $file .
'"><img src="' . $images . $file . '" /></a></td>';
$colCtr++;
}
echo '</table>' . "\r\n";
?>
</body>
</html>
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net