$row['catename']=str_repeat(' ',$spacc).'|--'.$row['catename']; 此行显示不对
此行执行时显示不对:
没有按照层级进行排列,请老师和高手帮忙指正一下.
[0] => Array ( [id] => 1 [pid] => 0 [catename] => |--news [cateorder] => 0 [createtime] => 0 ) [1] => Array ( [id] => 3 [pid] => 1 [catename] => |--country news [cateorder] => 0 [createtime] => 0 ) [2] => Array ( [id] => 5 [pid] => 3 [catename] => |--bj news [cateorder] => 0 [createtime] => 0 )