~~~
<table border="1">
<tr>
<th>name</th>
<th>brand</th>
<th>price</th>
</tr>
<?php
header("Content-type:text/html;charset=utf8");
$dqlist=array(
array("name"=>"洗衣机","brand"=>"海尔","price"=>"1000"),
array("name"=>"电视机","brand"=>"长虹","price"=>"2000"),
array("name"=>"冰箱","brand"=>"LG","price"=>"3400"),
);
foreach($dqlist as $k=>$x)
{
echo "<tr>";
echo "<td>".$x['name']."</td>";
echo "<td>".$x['brand']."</td>";
echo "<td>".$x['price']."</td>";
echo "</tr>";
}
?>
</table>
效果是这样的
~~~
![](https://box.kancloud.cn/6034b9b914ff325fad933981ac7be0bb_220x136.jpg)