2013年8月20日
摘要: 1. 读取记录while($row=mysql_fetch_array($result)){$record[]=array( 'title'=>$row['title'],'body'=>$row['body'],);}$smarty->assign('yes', $record);//传说中的替换变量,即将$record赋给yes2.在前台展示{foreach item=news from=$yes}{$news.title}:{$news.body}{/foreach} 阅读全文
posted @ 2013-08-20 13:36 张扬个性,敢为天下先 阅读(404) 评论(2) 推荐(0) 编辑