php FLEAにおけるツリー配列の遍歴出力

966 ワード

しかし、この方法で生成された二叉木の配列をどのように遍歴するのでしょうか.以下は私のやり方です.
 
  
function preTree($cat){
foreach ($cat as $c){
?>

=$c['poper']?>:=t($c['content'])?>






  • =$s['poper']?>:=t($s['content'])?>


    if(isset($s['childrens'])){
    ?>
    • $this->preTree($s['childrens']);
      ?>
    }
    ?>





}
}
?>