用php输入表格内容
<body> <table width="100%" border="1" cellpadding="0" cellspacing="0"> <tr> <td>代号</td> <td>姓名</td> <td>性别</td> <td>民族</td> <td>生日</td> </tr> <?php $attr = array( array("p001","李四",true,"汉族","1988-2-3"), array("p002","张三",true,"回族","1998-2-3"), array("p003","王五",true,"维吾尔族","1908-2-3"), array("p004","赵六",true,"汉族","1988-2-3"), ); //规定用表格形式显示出表中的数据 foreach($attr as $v) { echo "<tr> <td>{$v[0]}</td> <td>{$v[1]}</td> <td>{$v[2]}</td> <td>{$v[3]}</td> <td>{$v[4]}</td> </tr>"; } ?> </table> </body>