I have an array like this:
Array(
'level1' => 'someval',
'level2' => 'someotherval',
'level3' => 'thirdval'
)
I want to turn it into this:
Array(
'someval' => Array(
'someotherval' => Array(
'thirdval' => 1
)
)
)
Obviously I could build the example above by hand, but I don't know how many levels there will be. And this simple example might seem useless, but there are going to be more values, so there will be multiple arrays inside each of the levels.
1come from?