使用PHP和 Smarty写东西的时候,为什么无法正确的循环?数据库bloginfo表中有 ID,blogname,blogurl,display....等等字段。。//index.php
<?php
require "core.php";  $sql = mysql_query("select * from bloginfo");
$maxblog = mysql_fetch_array($sql); $tpl->assign("maxblog", $maxblog);

$tpl->display("index.html");
?>
//index.html        {section name=mg loop=$maxblog}
        <td width="20%"><a href="{$maxblog[mg].blogurl}">{$maxblog[mg].blogname}</a></td>
{/section}