PHP - "tabulate" array - make levels from elements
- by Moha
If I have an array like this:
Array
(
[0] => field_schools
[1] => und
[2] => 0
[3] => field_school
[4] => und
[5] => 0
[6] => value
)
How can I make an array like this from it?
array
(
[field_schools] => array
(
[und] => array
(
[0] => array
(
[field_school] => array
(
[und] => array
(
[0] => array
(
[value] => something
)
)
)
)
)
)
)
I want to specify the 'value' myself.