I have 2 arrays:
$bigArr = array(
'simple'=>1
'advanced'=>array(
'advanceSimple'=>1,
'advanceadvance'=>array(
'simple'=>1
)
)
)
$overide = array(
'advanced'=>array(
'advanceSimple'=>2,
'extra'=>5
)
)
the merge of those 2 should be:
$bigArr = array(
'simple'=>1
'advanced'=>array(
'advanceSimple'=>2,
'extra'=>5,
'advanceadvance'=>array(
'simple'=>1
)
)
)
you see that the overiden of the small array will overide only where the keys exist, and will add data where it doesnt exist.
I tried many ways of recursive iterator and loops, but still no go.
Do you have any ideas or similar workarounds.
array_merge?