Have two arrays
The first array
Array
(
[0] => Array
(
[SUM(j.Amount)] =>
[DebitAccount] =>
)
[1] => Array
(
[SUM(j.Amount)] => 15842.88
[DebitAccount] => 2310
)
[2] => Array
(
[SUM(j.Amount)] => 3656.68
[DebitAccount] => 2380
)
[3] => Array
(
[SUM(j.Amount)] => 12178.20
[DebitAccount] => 2610
)
)
And the second array
Array
(
[0] => Array
(
[SUM(j.Amount)] =>
[CreditAccount] =>
)
[1] => Array
(
[SUM(j.Amount)] => 15842.88
[CreditAccount] => 2310
)
[2] => Array
(
[SUM(j.Amount)] => 30916.44
[CreditAccount] => 2380
)
[3] => Array
(
[SUM(j.Amount)] => 3133.70
[CreditAccount] => 2620
)
)
What is aim? Need to get such output
Account number is 2310, Value is 0.00 (15842.88 - 15842.88)
Account number is 2380, Value is -30916.40 (3656.68 - 30916.44)
Account number is 2610, Value is 12178.20 (12178.20 (DebitAccount) - 0.00 (CreditAccount ))
Account number is 2620, Value is -3133.70 (0.00 (DebitAccount) - 3133.70 (CreditAccount ))
Now trying to understand how to do something like that if(DebitAccount == CreditAccount){from (corresponding DebitAccount SUM(j.Amount)) deduct (corresponding CreditAccount SUM(j.Amount));}
Could you advice how to reach the aim?