php循环输出表格
用嵌套for循环输出tr和td标签:<html> <head> <title>4*4表格</title> <meta charset="utf-8"> <style> td{width:180px;} </style> </head> <body> <table border="1" align="center"> <?php for($i=1;$i<5;$i++){ echo "<tr>"; for($j=1;$j<5;$j++){ echo "<td>$j</td>"; } echo "</tr>"; } ?> </table> </body> </html>