Multidimensional Array

General discussion on PHP

Multidimensional Array

Postby alla8559 on Mon Jun 05, 2017 3:34 pm

I received this array

array(teste,teste2,teste3, teste4) (or more)

and i need transform in this multidmensional array:
Code: Select all
array(
      'name' => teste,
      'child' => array(
        'name' => 'teste2',
        'child'  => array(
          'name' => 'teste3',
          'child' => array(
            'name' => 'teste4'
          )
        )
      )
    )




How i do this?
alla8559
 
Posts: 2
Joined: Mon Jun 05, 2017 12:23 am

Return to PHP

Who is online

Users browsing this forum: No registered users and 3 guests