I am trying to write a loop that will write 10 rows with 6 cells in each row. I want to assign an id for each cell in increments of 1. I have been able to do so for 1 row, but am unsure how to proceed with the subsequent rows. Basically, I need the first row of 6 cells to be assigned ids 1 through 6 (sequentially). The next row would be assigned 7 though 12, etc. Here's what I had so far to write the cells in the first row.
Code:
<?
for ($i=1; $i<7; $i++)
{
echo "<td id=\"td".$i."\">";
echo "text</td>";
}
?>