help with a program
Posted: Tue Feb 12, 2008 9:25 am
I wrote the following code to display the multiplication tables. Instead of having one large table like it is now, I want to create 10 seperate tables with spaces between them. Anyone have any suggestions?
<html>
<!-- Matthew Fierro
Tables
-->
<table border = "1">;
<?php
for ($a=1; $a<=10; $a+=5){
for ($r=0; $r<=10; $r++){
echo "<tr>";
for ($c=$a; $c<=$a+4;$c++){
$x=$c*$r;
echo "<td width= 60> $c x $r = </td> <td width=60> $x </td>";
}
echo "</tr>";
}
echo "<tr><td height=30></td></tr>";
}
?>
</table>;
</html>
<html>
<!-- Matthew Fierro
Tables
-->
<table border = "1">;
<?php
for ($a=1; $a<=10; $a+=5){
for ($r=0; $r<=10; $r++){
echo "<tr>";
for ($c=$a; $c<=$a+4;$c++){
$x=$c*$r;
echo "<td width= 60> $c x $r = </td> <td width=60> $x </td>";
}
echo "</tr>";
}
echo "<tr><td height=30></td></tr>";
}
?>
</table>;
</html>