This question already has an answer here:
- PHP subtract array values 3 answers
There two arrays:
Array1 (
[309] => "100"
[310] => "200"
[311] => "400"
)
Array2 (
[309] => "1"
[310] => "2"
[311] => "4"
)
How to get resulted array with difference of elements from arrays? i.e:
Array3 (
[309] => "99"
[310] => "198"
[311] => "396"
)
Thanks!
</div>