aatwo
05-27-2007, 06:35 AM
I have written some php that is echo'ing a table however for some reason it won't register the cellpadding value. No matter what value I set it to it ignores it and applies none.
Can anyone see any problems with my code which might be the cause of this?
The page in question can be found here... http://www.aatwo.com/art/
This is my code:
echo "<center><table cellpadding='10' width='600' border='0'>
<tr>
<th>Thumbnail</th>
<th>Image Details</th>
</tr>";
$color = "#AD9B4D";
while($row = mysql_fetch_array($result))
{
echo "<tr bgcolor='" . $color . "'>";
echo "<td align='center'><a href='" . $row['image'] . "'><img border='0' src='" . $row['thumbnail'] . "'></a></td>";
echo "<td align='justify'><b>" . $row['imageName'] . "</b><sub> (Posted " . $row['datePosted'] . ")</sub><br><br>" . $row['imageNotes'] . "<br><br></td>";
echo "</tr>";
if($color=="#AD9B4D")
{
$color="#9C8463";
}else{
$color="#AD9B4D";
}
}
echo "</table></center>";
Can anyone see any problems with my code which might be the cause of this?
The page in question can be found here... http://www.aatwo.com/art/
This is my code:
echo "<center><table cellpadding='10' width='600' border='0'>
<tr>
<th>Thumbnail</th>
<th>Image Details</th>
</tr>";
$color = "#AD9B4D";
while($row = mysql_fetch_array($result))
{
echo "<tr bgcolor='" . $color . "'>";
echo "<td align='center'><a href='" . $row['image'] . "'><img border='0' src='" . $row['thumbnail'] . "'></a></td>";
echo "<td align='justify'><b>" . $row['imageName'] . "</b><sub> (Posted " . $row['datePosted'] . ")</sub><br><br>" . $row['imageNotes'] . "<br><br></td>";
echo "</tr>";
if($color=="#AD9B4D")
{
$color="#9C8463";
}else{
$color="#AD9B4D";
}
}
echo "</table></center>";