格式化门户频道
loadcache('portalcategory'); $cat = $_G['cache']['portalcategory']; foreach($cat as $value) { if($value['upid'] == 0) { echo $value['catid']. ' : '. $value['catname']; echo "<br/>"; if($value['children']) { foreach($value['children'] as $val) { echo " ". $cat[$val]['catid']. ' : '. $cat[$val]['catname']; echo "<br/>"; } } } }