I want to create a multidimensional array based on a string.
the string has value $string="1/2/3"
and I want to assign $array[1][2][3]=something
actually the index of the array are described inside the $string
The $string has not same depth.
For example may be $string="1/2 OR $string="1/2/3/4/5 OR $string="1/2/3/5/7/8/9/9/6
so the number of keys in the multidimensional array is not standard.
Try with
Much simplier version
Some people could kill me for the eval function, but it works in this case perfectly 😛