I have this code:
for ($i = 0; $i <= 47; $i++)
{
echo "<tr>";
for ($i = 0; $i <= 11; $i++)
{
echo "<td class=\"tableContents color3\"></td>";
}
echo "</tr>";
}
When I execute it, it just keeps executing while it is supposed to stop execution after 47 loops.
Any ideas on what’s wrong and any better methods to achieve the same thing?
Thank you all.
You are resetting
$iinside your inner loop each time.It never increases to 47 in the outer loop.