顶foolbirdflyfirst(湖水清澈)的..
foreach..

解决方案 »

  1.   

    section只能适用于有序的数字数组.
      

  2.   

    {section name=customer loop=$custid}
    id: {$custid[customer]}<br>
    name: {$name[customer]}<br>
    address: {$address[customer]}<br>
    {section name=contact loop=$contact_type[customer]}
    {$contact_type[customer][contact]}: {$contact_info[customer][contact]}<br>
    {/section}
    <p>
    {/section}
      

  3.   

    是输不出来的,很奇怪?为什么
    一维数组可以
    foreach
    section二维数组不可以
    foreach
    section完全用手册中的例子,也不行??
      

  4.   

    <!--{foreach from=$my_arr item=item key=key}-->
    <!--{$key}-->:<BR>
    <!--{foreach from=$item item=item2 key=key2}-->  
    &nbsp;&nbsp;<!--{$key2}-->:<!--{$item2}-->       
    <!--{/foreach}-->
    <BR>
    <!--{/foreach}-->
      

  5.   

    这是结果:
    x :
      0:a 
    y :
      w :c   m :d