本文以实例描述了ThinkPHP采用标签实现三级循环代码,具体操作步骤如下: 1. 三级循环需要三维数组,实现代码如下: function MakeTree($pid,$level) { $map['pid'] = $pid; $map['level'] = $level; $result = $this->where($map)->order('rank ASC')->findall(); if($result){ foreach ($result as $key => $value){ $title = $value['alias']; $list[$title]