<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<style>
body{ text-align:center}
.bg_bs{ background-color:#9C3; color:#000;}
.bg_hs{ background-color:#CCC; color:#FFF;}
</style>
<?php
$i=1;
echo "<table>";
while($i<=9){
$j=1;
echo "<tr>";
while($j<=$i){
if($i%2>0){
echo "<td class='bg_bs'>";
}else{
echo "<td class='bg_hs'>";
}
echo $i.'*'.$j.'='.$i*$j;
echo "</td>";
$j++;
}
echo "</tr>";
$i++;
}
echo "</table>";
?>
</body>
</html>