Hello all,
I have two multidimensional array (associative) and i want to merge them into a new array which contain all the elements that are multidimensional array
for example
First array is like [CODE] Array
(
[contactId] => 451
[name] => Array
(
[fullName] => testing contact
)
[emails] => Array
(
[0] => Array
(
[address] => test@test.com
)
[1] =>Array
(
[type] => work
)
)
[company] => testing company
);
[/CODE]
And here is second array
[CODE] Array
(
[contactId] => 451
[name] => Array
(
[firstName] => testing contact
)
[emails] => Array
(
[0] => Array
(
[type] => home
)
[1] =>Array
(
[address] => new@test.com
)
)
[note] => This is simple note
);
[/CODE]
So, my final out put is like this;
[CODE] Array
(
[contactId] => 451
[name] => Array
(
[firstName] => testing contact
[fullName] => testing contact
)
[emails] => Array
(
[0] => Array
(
[address] => test@test.com
[type] => home
)
[1] =>Array
(
[address] => new@test.com
[type] => work
)
)
[note] => This is simple note
[company] => testing company
);[/CODE]
I know there are many ways doing this one but my array have more than 5000 contacts so i want optimize way for merging this type of array
So any quick and faster way for doing this.
Any help will be greatfull
Thanks and regards,
---Amit Patel