My function
function array_push_assoc(&$array, $key, $value){
echo $key.".".$value."<p>";
$array[$key] = $value;
return $array;
}
OUTPUT
USD.736.00
USD.100.00
Array
(
[USD] => 100.00
)
EUR.736.00
USD.100.00
Array
(
[EUR] => 736.00
[USD] => 100.00
)
I WANT OUTPUT
USD.736.00
USD.100.00
Array
(
[USD] => 836.00 // sum all the same currency
)
EUR.736.00
USD.100.00
Array
(
[EUR] => 736.00
[USD] => 100.00
)
Anybody Know how to do this?Please help .Thanks