I'm trying to create multiplication table using php as follows:
<?php
$cols = 10;
$rows = 10;
?>
... lot of html code ...
<?php
echo "<table border=\"1\">";
for ($r =0; $r < $rows; $r++){
echo('<tr>');
for ($c = 0; $c < $cols; $c++)
echo( '<td>' .$c*$r.'</td></tr>');
}
echo("</table>");
?>
I probably miss something but can't figure out what is it.
Any advices would be appreciated, thanks!