Good Evening,
I have a table that has a field with 15 entrys in it. I would like to output it from a query in a table that has 3 rows of 5. However, whenever I put a <tr> inside the loop, I get 15 rows. Any idea how I can get it to do three rows of 5.
X X X X X
X X X X X
X X X X X
<?php
$result = mysql_query("SELECT bull FROM draftpick_grid order by bull ASC")
or die(mysql_error());
echo "<tr>
<tr bgcolor='000000'>
<td colspan='100%' align='center' width='150'><img src='/images/bar_bull.jpg' width='150' height='19' border='0'></td>
<tr>
";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td width='30' align='center' bgcolor='FFFFFF'><font face='arial' size='1' color='000000'>";
echo "<img src='/images/".$row['bull'].".jpg' width='28' height='28' alt='Bulldogs'>";
}
echo "</td></table>";
?>
The above code gives me 15 rows....if I take out the <tr> I get one row of 15. I want 3 rows of 5. Anyone?