Hey everyone, here is what I am trying to do. I have a database with some data in it, and I want to display it in 4s. An HTML Table would be setup like this
<table>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
Im having a hard time doing this with PHP, because it is only giving me one big long row. Here is my coding:
<table width="680" border="1" cellspacing="3" cellpadding="3">
<tr>
<?php
$db = mysql_connect("localhost","root") or mysql_die ("Unable to Connect to Mysql.. please contact Brandon about this!");
mysql_select_db("micko", $db);
$sql = "SELECT * FROM $act ORDER BY id DESC";
$result = mysql_query($sql)
OR die(mysql_error());
while($row = mysql_fetch_array($result))
{
$id = $row['id'];
$author = $row['username'];
$url = $row['img_url'];
$date = $row['date'];
$caption = $row['caption'];
echo "<td>
<font face='Arial, Helvetica, sans-serif' size='1.5'>$caption<br><a href='viewer.php?use=$url'><img src='$url' alt='$caption' width='160' height='120'></a><br>Submited by <b>$author</b>.</td>
";}
?></td></tr>
</table>