小白求助,三层循环加载不出来,怎么整啊 烦死了

浏览:101 发布日期:2019/08/19 分类:求助交流
 {foreach $res as $v1} 
                {if $v1['parent_id'] eq 0}
                <div class="item">
                  <h3><a href="">{$v1.name}</a></h3>
                  <div class="item-list clearfix">
                    <div class="subitem">
                      {foreach $res as $v2}
                      {if $v2['parent_id'] eq $v1['id']}
                      <dl class="fore2">
                        <dt><a href="">{$v2.name}</a></dt>
                        <dd>
                          {foreach $res as $v3}
                          {if $v3['parent_id'] eq $v2['id']}
                          <em><a href="">{$v2.name}</a></em>
                          {/if}
                          {/foreach}
                        </dd>
                      </dl>
                      {/if}
                      {/foreach}
                    </div>
                  </div>
                </div>
                {/if}
                {/foreach}
最佳答案
评论( 相关
后面还有条评论,点击查看>>