【发布时间】:2013-06-14 09:13:51
【问题描述】:
我有这个 php 代码:
$tunnid = array();
while ($row = mysql_fetch_assoc($result)) {
$tunnid[] = $row['total'];
}
$this->set('tunnid', $tunnid);
mysql_free_result($result);
为了显示它,我有这个:
<?php
if(!empty($tunnid)) {
foreach($tunnid as $tund) {
echo "$tunnid";
}
}
由于某种原因,这会返回 ArrayArrayArrayArray
我在这里做错了什么?谢谢
【问题讨论】:
-
您正在将数组转换为字符串。