Displaying sql returns in a Table?
Posted: Thu Aug 25, 2005 11:57 am
I am trying to get my returns to display an image in a table with the name below it in a cell and have them side by side instead of below each other, This is the code I have that displays the image name and name side by side but I can't figure out how to get it to do it in a table.
I was wondering if you could just return something like this
Code: Select all
while($row = mysql_fetch_array($result))
{
echo $row[image].'--'.$row['name'].' ';
}
echo '<br>';
echo '<br>';
echo '<br>';Code: Select all
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="17%" height="171">
<tr>
<td width="100%" height="132">
<p align="center">
<img border="0" src="image.jpg" width="172" height="175"></td>
</tr>
<tr>
<td width="100%" height="38">
<p align="center">Name</td>
</tr>
</table>