这是我的模板页
<form method="get">
<div class=list_txt >
<ul>
<li><span>{time}</span><div><a href="all.php?id={topic_id}">{topic_title}</a></div></li>
</ul>
</div>
</form>
以下是我的PHP代码
$result = mysql_query("SELECT topic_id,forum_id,topic_title,topic_time from phpbb_topics where forum_id =38 order by topic_time desc ");
$row = mysql_fetch_array($result);
mysql_close($con);
include "./fasttemp/class.FastTemplate.php3";
$tpl = new FastTemplate("./fasttemp");
$tpl->define(array('foo' => "list_txt.html", 'bar' => "bar.tpl"));
$tpl->assign('topic_title', "$row[topic_title]");//获取帖子号,用于“加入讨
$tpl->assign('time', date('Y-m-d', $row['topic_time']));//获取时间
$tpl->parse('pagecontent', "foo");
$tpl->assign('topic_id', "$row[topic_id]");//获取主题号,用于“加入讨
$tpl->parse('main', "foo");
$tpl->FastPrint('main');
?>
以上的循环只能显示一条记录,要怎么改才能循环显示数据库里的所有数据呢
一楼你用的是phplib template吧,我要用的是fasttemplate模板,两者一样吗