Hello all,
I know how to turn a string into an array where the parts of the string become array keys:
Code PHP:$string = 'one_two_three'; $array = array_flip(explode('_', $string)); print_r($array);But how could I turn that string into a multi-dimensional array like this:Code:Array ( [one] => 0 [two] => 1 [three] => 2 )
... btw. the values are not important for now.Code:Array ( [one] => Array ( [two] => Array ( [three] => 2 ) ) )
Thanks for any help.
oerdec




Bookmarks