So basically I have these two arrays I want to merge...
array(1) {
["first"]=>
array(1) {
["second"]=>
array(0) {
}
}
}
array(1) {
["second"]=>
array(1) {
["third"]=>
array(0) {
}
}
}
And this is the result I'd like to achieve...
array(1) {
["first"]=>
array(1) {
["second"]=>
array(1) {
["third"]=>
array(0) {
}
}
}
}
But using $arr = array_merge_recursive($arr1, $arr2)
I get this output:
array(2) {
["first"]=>
array(1) {
["second"]=>
array(0) {
}
}
["second"]=>
array(1) {
["third"]=>
array(0) {
}
}
}
From what I understand array_merge_recursive should get me what I want, but apparently doesn't. What would be a solution for my problem?
Thanks