关于smarty取oracle数据数组后传递时,只取每个字段第一个字符的有关问题

关于smarty取oracle数据数组后传递时,只取每个字段第一个字符的问题
我刚接触smarty,在获取oracle数据以后,传递时发现只取每个字段的第一个字符,而且还是乱码。

代码如下:
smarty.php


<?php

include 'ora/oraconn.php';

   $dRootDir = '../../';
   
   require_once($dRootDir . '_config.php');
   require_once($dRootDir . 'inc/params.php'); 
   require_once($dRootDir . 'inc/classes/db.php');
   require_once($dRootDir . 'inc/classes/template.php');
   require_once($dRootDir . 'inc/classes/util.php');
      
$tpl = new Template($gTemplate);
Util::gpc();


$sql="SELECT bpcnum_0 as BPCNUM,bpcnam_0 AS BPCNAM from bpcustomer where rownum<10";
$stmt = oci_parse($conn, $sql);

oci_execute($stmt);

$array = oci_fetch_array($stmt, OCI_BOTH);

$tpl->assign('ssss',$array);
$tpl->assign("News_CH", $array);
unset($array);
$tpl->display('smarty.tpl');
?>


以下是smarty.tpl


<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#B9E9FF">
<tr> 
<td height="115" width="10"></td>
<td valign="top" width="295" bgcolor="#B9E9FF">
{--section name=customer loop=$News_CH--}
<li ><a href="news.php?type=1&id={--$News_CH[customer].BPCNUM--}" >{--$News_CH[customer].BPCNAM--}
</a></li>
{--/section--}

</td>
</tr>
</table>


请高手不吝赐教,哪里出了问题。谢谢!
------解决方案--------------------
先不管 smarty
在 $array = oci_fetch_array($stmt, OCI_BOTH);之后
print_r($array);
看看都是些什么

------解决方案--------------------
我要看到你从数据库读出的数据!

按 oci_fetch_array($stmt, OCI_BOTH) 应该是下标数组
那么 $News_CH[customer].BPCNUM 就是错的

但需要看到数据才能确定
------解决方案--------------------
在smarty.php 中 print_r($array);exit(); 看看是什么结果。
------解决方案--------------------
可能你输出的不是一个正常的数组,看下输出的数据有没有问题;