Might be basic stuff i’m asking for, but i couldn’t find a solution to the silly problem, so please help
I want to show products for online store (pic, info, price - from mysql), lets say 3 products on each row. Just couldn’t think of a way to make the php loop the html tags exactly after each 3 posts from mysql. Have no problem getting the info from mysql and get the products 1 in a row - as i have it now:
$query = “SELECT * FROM productinfo”;
$result = mysql_query ($query)
or die (“Couldn’t execute query.”);
while ($row = mysql_fetch_array($result))
{
echo "<tr>
<td>
<table>
<tr><img src=’{$row[‘pic’]}’></tr><br> <tr>{$row[‘info’]}</tr><br> <tr>{$row[‘price’]}</tr>
</table>
</td></tr>
";
}