I have a multidimensional array that looks like this:
Array (
[0] => Array (
[date] => August
[mozrank] => 2
[domain_authority] => 41
[external_links] => 9
[unique_visitors] => 14
)
[1] => Array (
[date] => August
[post_count] => 70
[comment_count] => 53
[theme] => yes
[plugins] => 3
)
[2] => Array (
[date] => September
[mozrank] => 4
[domain_authority] => 42
[external_links] => 10
[unique_visitors] => 20
)
[3] => Array (
[date] => September
[post_count] => 71
[comment_count] => 56
[theme] => yes
[plugins] => 5
)
)
You'll notice that there are two arrays that have the same key/value pair of August and two arrays that have the same key/value pair of September. However in each case they have different keys associated with them. I'm trying to group each array on the date key where the value is the same and merge the other keys together. For example, the output would be:
Array (
[0] => Array (
[date] => August
[mozrank] => 2
[domain_authority] => 41
[external_links] => 9
[unique_visitors] => 14
[post_count] => 70
[comment_count] => 53
[theme] => yes
[plugins] => 3
)
[1] => Array (
[date] => September
[mozrank] => 4
[domain_authority] => 42
[external_links] => 10
[unique_visitors] => 20
[post_count] => 71
[comment_count] => 56
[theme] => yes
[plugins] => 5
)
)
Any ideas?