循环中
$template->set_var("变量",值);
$template->parse("变量","块",true);

解决方案 »

  1.   

    $db->qury("select * from table");
    $i=1;
    $N=5;    //N列
    while($db->next_record())

      if($i%$N==0)
        echo "<br>";  echo $db->Record["cloumn"]."&nbsp;&nbsp;";
       $i++;
    }
      

  2.   

    N行N列在模板文件里去实现,与PHPLIB无关。
      

  3.   

    我的方案:
    <HTML>
    <TABLE>
    <!-- Block -->
     <TR>
       <TD>{var1}</TD>
       <TD>{var2}</TD>
       <TD>{var3}</TD>
       <TD>{var4}</TD>
     </TR>
    <!-- Block -->
    </TABLE>
      

  4.   

    看看这篇文章你就知道怎么做了http://phpe.net/articles/333.shtml