Ok, lets say this is my array:
array (
array('Name' => "Matt", 'Sales' => '35'),
array('Name' => "Matt", 'Sales' => '14'),
array('Name' => "Matt", 'Sales' => '02'),
array('Name' => "Matt", 'Sales' => '56'),
array('Name' => "Matt", 'Sales' => '12'),
array('Name' => "John", 'Sales' => '02'),
array('Name' => "John", 'Sales' => '21'),
array('Name' => "John", 'Sales' => '17')
);
How can I combine the similar elements (Name) and add all the 'Sales' together.. so the array would look like this:
array (
array('Name' => "Matt", 'Sales' => '119'),
array('Name' => "John", 'Sales' => '40')
);
I know it really shouldn't be done this way but it's the only option for my current situation and no, this is not the actual array it's just an example. I saw this question posted before when I used the 'search' but that was months ago and not a single person replied.
THANKS 🙂
Matt