如何用php打印出10*10表格呢?且看我是如何把它实现的,请看-------->
<?php //打印出10*10表格 $a=1; echo "<table border='1'>"; for($i=1;$i<=10;$i++) { echo "<tr>"; for($j=1;$j<=10;$j++) { echo "<td>{$a}</td>"; $a++; } echo "</tr>"; } echo "</table>"; ?>
这个简短的小程序应该注意如下:
echo "<table border='1'>";-----------------------------------------------不能写成----------------------------------------------echo "<table border=“1”>";