I'm looking to combine two arrays into one array, but I would like to keep the key values the same and accumulate their values into one.
Using PHP I'm looking for something like this:
//inputs
array(
cat => 4,
dog => 3,
bug => 6
);
array(
cat => 2,
dog => 5,
bug => 9,
ant => 3
);
//output
array(
cat => 6,
dog => 8,
bug => 15,
ant => 3
);