I barely know PHP and a friend came over today and helped me immensely. I feel bad asking for more help. So I am hoping you guys can help me. I made a nice looking page but every product on it is called productFI1. I need them to be incremented in the for loop so I can style them in css so each can have its own name. Here is the code I have. I know I probably have to create some variable to hold them, but I have no idea how.
<?php
include "connect.php";
$conn=ShopConnect();
$query = "Select * from products where featuredItem = 1;";
$retval = mysql_query($query, $conn);
$rowNum = mysql_num_rows($retval);
$colcount=3;
$rowcount= $rowNum/$colcount;
?>
<span class="sectionTitle">Featured Items </span><br /><br />
<div id="featuredItems">
<table width="802" >
<tr>
<?php
for($i=0;$i < $rowcount;$i++) //down
{
echo ("<td>");
for($j=0;$j < $colcount;$j++) //across
{
while ($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
$ID=$row['prodID'];
echo("<div id='productFI1'> <img src='" . $row['itemImg'] . "'/></div>" .
"<div id='prodName'>" . $row['prodName'] . "</div>" .
"<div id='prodDesc'>" . $row['prodDesc'] . "</div>" .
"<div id='prodPrice'>" . $row['prodPrice'] . "</div>" .
"<div id='prodRate'>" . $row['prodRate'] ."</div>");
}
}
}
?>