I have this array:
Array(
[0] => Array(
[type] =>
[base] => 10.0
[amount] => 0
)
[1] => Array(
[type] => 15.0
[base] => 12.0
[amount] => 1.8
)
[2] => Array(
[type] => 15.0
[base] => 12.0
[amount] => 1.8
)
[3] => Array(
[type] => 2.0
[base] => 12.0
[amount] => 0.24
)
How can I get below array with php? I need to group "types" adding "amount" & "amount", but omitting elements without type value
Array(
[0] => Array(
[type] => 15.0
[base] => 24.0
[amount] => 3.6
)
[1] => Array(
[type] => 2.0
[base] => 12.0
[amount] => 0.24
)
)
typevalue but differentamountvalues?