Hi to all,
i am trying to setup a multidimensional array but my problem is that i can not get the right order from incoming data.
Explain
$x[1][11]=11;
$x[1]=1;
var_dump($x);
In the above code i get only x[1].
To right would be
$x[1]=1;
$x[1][11]=11;
var_dump($x);
But in my case i can dot ensure that x[1] will come first, and x[1][11] will come after.
Is there any way that i can use the first example and get right the array. Keep in mind that the array depth is large.
I am trying to get an array as tree
$x[node]=node data
$x[node][childs]=childs data
etc..
and from incoming data is not sure that node will come first and child second and i am looking for a solution to create the array right
Thanks