![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
相关问题
模板内容如下:test.html
--------------------------------------------------------------------------------------------------------------
{section name=A loop=$my}
{/section}
----------------------------------------------------------------------------------------------------------------
php文件 test.php :
----------------------------------------------------------------------------------------------------------------
while($arr=mysql_fetch_array($sql))
{
$smarty->append("my",$arr);
}
$smarty->display( test.html' );
我就想把数据库里的数据赋给模板中的变量,
达到逐行输出的效果。
我想知道还有没有更好的办法?
提问者:liuqh 08-18 11:11
答复

