how would i go about displaying results within complex tables, ie a new <td> is created for each record but every 3rd record </tr><tr> is also used ?
<table>
<tr>
<?
$sql = mysql_query(query string)
$list = mysql_num_rows($sql)
$row = mysql_result($sql)
$id = $row["db field"];
$item = $row["db field"];
while ($i < $list) {
print"<td>$id, $item</td>";
$i++;
}
?>
</tr>
</table>
tried the above with out much look, any pointers ??? i have tried counting but agian with no luck ie
$n=1
while ($i < $list) {
if ($n='3') {
print"<td>$id, $item</td></tr><tr>";
$i++;
$n+1;
}
else {
print"<td>$id, $item</td>";
$i++;
}
}
?>
sorry if some code wrong, not at home, sitting in an internet cafe @mo
thanks darren ramowski