PHP返回单词数组


PHP returns the word array

我有这个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";
    }
}

由于某些原因,返回arrayarrayarray

我做错了什么?由于

你打错了一个字

<?php
if(!empty($tunnid)) {
     foreach($tunnid as $tund) {
     echo "$tund"; //not tunnid
   }
}