Use PHP code to output the multiplication table. Friends in need can refer to it.
Do you still remember the dream you had when you were young? The ninety-nine multiplication tables that we are familiar with are implemented for everyone in this article using PHP code. Learn small examples of PHP operators. <?php /** * 九九乘法表 * site bbs.it-home.org * date 2013-4-6 */ echo "<table width=550px border='1'>"; //确定行 for($i=1;$i<=9;$i++){ echo "<tr>"; for($j=1;$j<=$i;$j++){ $res=$i*$j; echo "<td>"; echo "$j"."x"."$i=".$res; echo "</td>"; } echo "</tr>"; } echo "</table>"; ?> Copy after login |