PHP中打印九九乘法表
<style>
table{
width: 980px;
}
table,td{
border: 1px solid #0000ff;
border-collapse:collapse;
text-align: center;
}
td{
height: 40px;
}
</style>
<table>
<?php
for($i=1;$i<=9;$i++){
echo "<tr>";
for($j=1;$j<=$i;$j++){
echo "<td>{$j}*{$i}=".($j*$i).'</td>';
}
echo "</tr>";
}
?>
</table>