赋值错误:
$tpl->assign("newnotice",$array2);
应该为
$tpl->assign("oldnotice",$array2);

解决方案 »

  1.   

    <?php
        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');
    ?>
      

  2.   

    显示第二个查询
    <{section name=loop_1 loop=$oldnotice}>
      <tr>
        <td height="24" class="title_list"><{$oldnotice[loop_1].subject}></td>
      </tr>
    <{/section}>第二个改下名字试试,
      

  3.   

    error_reporting一下,看提示什么错误
      

  4.   

    $tpl->assign("newnotice",$array1);
    $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');