Home > Backend Development > PHP Tutorial > smarty section取数据有关问题。求大神

smarty section取数据有关问题。求大神

WBOY
Release: 2016-06-13 13:15:09
Original
898 people have browsed it

smarty section取数据问题。求大神
function fetch_array($query){
while($arr=mysql_fetch_array($query,MYSQL_ASSOC)){
$row[]=$arr;
}



return $row;
}

这样为何我取不出两条数据。只有一条
$query=$db->fn_select('news','0');

$rows=$db->fetch_array($query);




$smarty->assign("news",$rows);


$smarty->display("index.html")

------解决方案--------------------
$query=$db->fn_select('news','0'); 这个方法如何写的?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template