<table>
<tr><td>查询结果:</td></tr>
<!-- BEGIN linelist -->
<tr>
<!-- BEGIN rowlist -->
<td>{name}</td>
<!-- END rowlist -->
</tr>
<!-- END linelist -->
</table>

解决方案 »

  1.   

    没看明白,你倒底是要在两行显示还是在一行中显示?
    如果在两行显示应为:
    <table>
      <tr><td>查询结果:</td></tr>
      <tr><td>{name}</td></tr>
    </table>如果要显示在一行里应该写成
    <table>
      <tr>
        <td>查询结果:</td>
        <td>{name}</td>
      </tr>
    </table>
      

  2.   

    /**  BEGIN function
        *
        *   作者:偶然
        *   功能:导航组件,这是类里的一个方法,我提出来了,它本来是用来显示导航栏的,每行显示12个后,自动换行。因为没有完整的类,你最好自己整理一下。
        *
        */
        function channel()
        {
            /* 设置文件句柄 */
            $this->t->set_file("filehandle","channel.htm");        /* 设置块 */
            $this->t->set_block("filehandle","rowlist","R");
            $this->t->set_block("rowlist","collist","C");
            $sql_num   = "SELECT COUNT(*) AS num FROM channel WHERE s_id='".$this->sitesid."' and ch_fid=0";
            $res_num   = $this->query($sql_num);
            $arr_num   = $this->fetch_array($res_num);
            $num       = $arr_num['num'];
            $columns   = 12;
            $td_width  = 100/$columns."%";
            $remainder = $num%$columns;
            $rows      = ceil($num/$columns);
            for($i=0; $i<$rows; $i++)
            {
                $k = $i*$columns;
                $sql_channel = "SELECT ch_cid,ch_fid,ch_name FROM channel WHERE ch_fid=0 and s_id='".$this->sitesid."' order by ch_sort asc LIMIT $k,$columns";
                $res_channel = $this->query($sql_channel);            /* 清空多余 */
                $this->t->set_var("C");
                $j = 0;
                while($arr_channel = $this->fetch_array($res_channel))
                {
                    /* 去除首次循环条 */
                    if($j==0)
                    {
                        $this->t->set_var("modpath",'');
                    }
                    else
                    {
                        $this->t->set_var("modpath",$this->modpath);
                    }
                    /* 导航文字 */
                    $this->t->set_var("channel_name","<a href=show.php?site=".$this->sitename."&channel=".$arr_channel['ch_cid'].">".$arr_channel['ch_name']."</a>");
                    $this->t->parse("C","collist",true);
                    $j++;
                }
                $this->free_result($res_channel);
                $this->t->parse("R","rowlist",true);
            }
            $this->t->parse("channel","filehandle");
        }channel.htm
    --------------- 模板文件 ----------------------------
    <table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
     <!-- BEGIN rowlist -->
      <tr>
        <!-- BEGIN collist -->
    <td align="center"><img src="{modpath}images/line.gif" width="2" height="26"></td>
    <td align="center">{channel_name}</td>
        <!-- END collist -->
      </tr>
     <!-- END rowlist -->
    </table>