A
A
Anton Chernogolov2016-01-25 22:26:07
PHP
Anton Chernogolov, 2016-01-25 22:26:07

How to get a competent tree menu from a multi-level php array?

How to properly display such an array in php as a tree?

array(2) {
   ["docs"]=>
   array(2) {
     [1]=>
    array(2) {
      [11]=>
      array(1) {
        [111]=>
        array(1) {
          [1111]=>
          array(1) {
            [11111]=>
            array(0) {
            }
          }
        }
      }
      [12]=>
      array(0) {
      }
    }
    [2]=>
    array(0) {
    }
  }
  ["photos"]=>
  array(0) {
  }
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis, 2016-01-25
@prototype_denis

593982cdef634b3d8c1c23cba9ab3478.png

Y
Yuri, 2016-01-25
@riky

study recursions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question