I want to display datas from a database in an html table. I have many records but I want to display them 4 by line, how can I achieve that? Here's the code that I have now that works but he display all of them on the same line.
Thanks for helping
)
<table>
<tr>
<?
$requeteProducts = mysql_query("SELECT * FROM products");
while ($Products = mysql_fetch_array($requeteProducts))
{
print "<td align='middle'><table>";
print "<tr>";
print "<td class='products'>".$Products['Products_Name']."</td>";
print "</tr>";
print "<tr>";
print "<td><img src='products/".$Products['Products_Img']."'></td>";
print "</tr>";
print "</table></td>";
}
?>
</tr>
</table>
Thanks for helping
<table>
<tr>
<?
$requeteProducts = mysql_query("SELECT * FROM products");
while ($Products = mysql_fetch_array($requeteProducts))
{
print "<td align='middle'><table>";
print "<tr>";
print "<td class='products'>".$Products['Products_Name']."</td>";
print "</tr>";
print "<tr>";
print "<td><img src='products/".$Products['Products_Img']."'></td>";
print "</tr>";
print "</table></td>";
}
?>
</tr>
</table>