📅  最后修改于: 2022-03-11 14:58:38.992000             🧑  作者: Mango
$no=9;
echo "";
echo "";
for ($row=1; $row<=8 ; $row++) {
$no--;
echo "";
for ($col=1; $col<=8; $col++) {
$color="";
if ($row==$col) {
$color = 'background-color:red';
}
if ($col==$no) {
$color = 'background-color:green';
}
echo "".$row*$col." ";
}
echo " ";
}
echo "
";
echo " ";