A-A+ 文章标题从数据库中读出,并且赋值给一个数组,最后通过smarty循环显示出来 2012年11月24日 编程技术 暂无评论 php程序: [code lang="php"] assign("arr",$arr); $smarty->display("new_list_html.tpl.html"); ?> [/code] smarty程序: [code lang="php"] 文章列表 ID {foreach from=$arr item=title key=j} {$j}--{$title} {/foreach} [/code]