But how to traverse the binary tree array generated by this method? Here's how I do it:
Copy code The code is as follows:
function preTree ($cat){
foreach ($cat as $c){
?>
=$c['poper']?>:=t($c['content'])?>
}
}
?>
http://www.bkjia.com/PHPjc/326123.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326123.htmlTechArticleBut how to traverse the binary tree array generated by this method? Here is how I did it: Copy the code The code is as follows: ?php function preTree($cat){ foreach ($cat as $c){ ? pa href="http...