<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
th,.colorRed{
color: red;
font-weight: bold;
text-align: center;
}
.div{
text-align: center;
margin: 0 auto;
}
</style>
</head>
<body>
<div class="div">乘法口诀表</div>
<div>
<table boder=0 cellspacing="0" border="1" width=900px class="div">
<tr>
<th>
x
</th>
<th>
1
</th>
<th>
2
</th>
<th>
3
</th>
<th>
4
</th>
<th>
5
</th>
<th>
6
</th>
<th>
7
</th>
<th>
8
</th>
<th>
9
</th>
</tr>
<?php
for($i=1;$i<=9;$i++){
echo("<tr align=center>");
echo("<td class='colorRed'>");
echo($i);
echo("</td>");
for($j=1;$j<=9;$j++){
if($j<=$i){
echo("<td width=90px>$i X $j = ");
echo($i*$j);
echo("</td>");
}
else{
echo("<td width=90px>");
echo("</td>");
}
}
echo("</tr>");
}
?>
</table>
</div>
</body>
</html>