I have the following php code that generates a 10X10 table:
<?php
echo "<table border =\"1\" style='border-collapse: collapse'>";
for ($row=1; $row <= 10; $row++) {
echo "<tr>
";
for ($col=1; $col <= 10; $col++) {
$a = "$row * $col";
echo "<td><a href = '$a'>$a</a></td>
";
}
echo "</tr>";
}
echo "</table>";
?>
How to recreate this table in HTML, such that links will work?
Every field in a table needs to do a multiplication, e.g. field '5*6' gives result '30'. How to write a php class that will do this operation? So, for
row*column
, return variableresult
.