I added this part in, so it can perform infinite loop. Is this right? But I get errors executing it since variable 'i' is not declared.
Agree as above, you cant expect to be able to + 1 to a variable which hasn't been instantiated. Set it to 0 or 1 before, outside the loop
Try this simple code for looping $brush_price = 5; echo "<table border=\"1\" align=\"center\">"; echo "<tr><th>Quantity</th>"; echo "<th>Price</th></tr>"; for ( $counter = 10; $counter <= 100; $counter += 10) { echo "<tr><td>"; echo $counter; echo "</td><td>"; echo $brush_price * $counter; echo "</td></tr>"; } echo "</table>"; Code (markup):