Home > php教程 > php手册 > php FLEA中二叉树数组的遍历输出

php FLEA中二叉树数组的遍历输出

WBOY
Release: 2016-06-13 11:57:11
Original
817 people have browsed it

但是要怎样遍历这个方法产生的二叉树数组呢?以下是我的做法:

复制代码 代码如下:


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']);
      ?>
    }
    ?>





}
}
?>
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template