Array ( [0] => Array ( [ID] => 1 [date] => 2011-04-11 [time] => 15:03:21 [content] => 大家好啊,我是曹某人,我现在来测试一下,看看正确吧,多谢支持啊! [comment_total] => 2 ) [comment] => Array ( [0] => Array ( [comment_id] => 1 [comment_date] => 2011-04-05 [comment_time] => 11:21:24 [comment_content] => 恩,恭喜你,测试通过了! ) ) ) 

解决方案 »

  1.   


    {section name=foo loop=$record step=1}
        {$record[foo]}<br />
    {/section}
      

  2.   

    <!-- assign('record',$record) -->
    {section name=foo loop=$record step=1}
        {$record[foo]}<br />
    {/section}
      

  3.   

    多谢大家的帮忙!
    问题已得到解决
    代码如下
    {section name=sec1 loop=$row_array}
    <div id="micro_blog">
    <h2>微博</h2>
    微博发表时间:<b>{$row_array[sec1].date}&nbsp;&nbsp;{$row_array[sec1].time}</b><br />
    微博序号为:<b>{$row_array[sec1].ID}</b><br />
    微博评论总数为:<b>{$row_array[sec1].comment_total}</b><br />
    微博内容是:<b>{$row_array[sec1].content}</b><br /><br /><br /><br /> {section name=sec2 loop=$row_array[sec1].comment}
    <div >评论
            评论日期是:<b>{$row_array[sec1].comment[sec2].comment_date}&nbsp;{$row_array[sec1].comment[sec2].comment_time}</b><br />
            评论序号是:<b>{$row_array[sec1].comment[sec2].comment_id}</b><br />
            评论内容是:<b>{$row_array[sec1].comment[sec2].comment_content}</b>
            </div>
        {/section}<!--内层循环-->
    </div>
    外部共循环:{$smarty.section.sec1.total}次
    {/section}<!--外层循环-->