I have seen various posted about this question so am aware some answers to this may exist. however I am none the wiser after reading these.
I have an array that is
If you have PHP 5.5+ you can do this without looping or using a callback (since function calls are relatively expensive) ... just use:
$sum = array_sum(array_column($account_invoices, 'vatAmount'));