I have a situation where I can not find a solution.
Suppose we have two arrays as follows:
array('br', 'com', 'example1' )
and another array like this:
array('br','com','example2')
What I would like is to turn these two arrays into just one so that it looks like a data tree like
br
!_com
!_example1
|_example2
or if you can also arrange them in a format that you can read in jSon
br:{
com:{ "example1", "example2" }
}
Could someone propose an algorithm or is there a function in PHP that does this?