数据结构如上
用select * from table limit 1
while($row=mysql_fetch_array($resutl)){
foreach($row as $key=>$val){
echo $key => $val
;
}
}
输出结构与表不一样,因为数据结构列的数量和字段名不固定,不能指定下标,请问下各位要怎么输出才可以达到跟表格式一致,谢谢了!!
回复讨论(解决方案) mysql_fetch_array 改为 mysql_fetch_assoc