赋值错误:
$tpl->assign("newnotice",$array2);
应该为
$tpl->assign("oldnotice",$array2);
$tpl->assign("newnotice",$array2);
应该为
$tpl->assign("oldnotice",$array2);
解决方案 »
- 还是重新发帖说一下手册上“关于引用”的问题
- 请问mysqli_select_db() expects parameter 1 to be mysqli
- php 中关于类的调用出错supplied argument is not a valid MySQL-Link resource in
- url传递参数的问题,请教高手
- 用PHP怎么实现点菜?
- 再次提问 关于PHP时间的问题!!!
- php 和mysql web 开发 第三版 源码
- 为什么我的PHP文件执行都显示乱码
- iwind帮帮我哦,谢谢!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 请问怎样用PHP收发UDP?
- 高人好心人来帮我解决个问题吧
- 如何取出 字段值??
require "smarty/main.php";
include "smarty/class/include/conn.php";
//咱家公告当前活动
mysql_query("SET NAMES 'gbk'");
$result1 = mysql_query("SELECT * FROM cdb_threads WHERE fid = '48' order by dateline desc limit 0,5");
while($row1=mysql_fetch_array($result1)){
$array1[] = $row1;
}
//咱家公告已往活动
$result2 = mysql_query("SELECT * FROM cdb_threads WHERE fid = '48' order by dateline desc limit 5,5");
while($row2=mysql_fetch_array($result2)){
$array2[] = $row2;
}
$tpl->assign("newnotice",$array1);
$tpl->display('index.html');
$tpl->assign("oldewnotice",$array2);
$tpl->display('index.html');
?>
<{section name=loop_1 loop=$oldnotice}>
<tr>
<td height="24" class="title_list"><{$oldnotice[loop_1].subject}></td>
</tr>
<{/section}>第二个改下名字试试,
$tpl->display('index.html');
$tpl->assign("oldewnotice",$array2);
$tpl->display('index.html');一个页面只要一个display就行了$tpl->assign("newnotice",$array1);
$tpl->assign("oldewnotice",$array2);$tpl->display('index.html');