<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head> <body>
<table width="100%" border="" cellpadding="" cellspacing="">
<tr>
<td>代号</td>
<td>姓名</td>
<td>性别</td>
<td>民族</td>
<td>生日</td>
</tr> <?php
$attr = array(
array("p001","李四",true,"汉族","1998-2-3"),
array("p002","夏天",true,"回族","1998-2-3"),
array("p003","王小二",true,"*","1978-2-3"),
array("p004","小刘",true,"汉族","1986-2-3"),
); //规定用表格形式显示出表中的数据 foreach($attr as $v)
{
echo "<tr>
<td>{$v[]}</td>
<td>{$v[]}</td>
<td>{$v[]}</td>
<td>{$v[]}</td>
<td>{$v[]}</td>
</tr>";
} ?> </table> </body>
</html>
显示的结果: