I have a array like the bellow.
Array
(
[1] => Array
(
[TotalPosts] => 46
[AgentSchemeNumber] => 11
[AgentName] => Vaiji
)
[2] => Array
(
[TotalPosts] => 3
[AgentSchemeNumber] => 22
[AgentName] => Vaiji
)
[3] => Array
(
[TotalPosts] => 0
[AgentSchemeNumber] => 33
[AgentName] => Vicky
)
[4] => Array
(
[TotalPosts] => 0
[AgentSchemeNumber] => 44
[AgentName] => Raja
)
[5] => Array
(
[TotalPosts] => 18
[AgentSchemeNumber] => 55
[AgentName] => Rama
)
[6] => Array
(
[TotalPosts] => 13
[AgentSchemeNumber] => 66
[AgentName] => Udaya
)
)
Here AgentName vaiji contain 2 records. I want a output like
Array
(
[1] => Array
(
[TotalPosts] => 49
[AgentSchemeNumber] => 11 or 22 (any number)
[AgentName] => Vaiji
)
[2] => Array
(
[TotalPosts] => 0
[AgentSchemeNumber] => 33
[AgentName] => Vicky
)
[3] => Array
(
[TotalPosts] => 0
[AgentSchemeNumber] => 44
[AgentName] => Raja
)
[4] => Array
(
[TotalPosts] => 18
[AgentSchemeNumber] => 55
[AgentName] => Rama
)
[5] => Array
(
[TotalPosts] => 13
[AgentSchemeNumber] => 66
[AgentName] => Udaya
)
)
Please help me how to do it?