Is there a php function that returns the sum of a row of an associative array?
If not should I just use a counter and a foreach loop?
Appreciate it!
To get the sum based on a certain column key, use this:
array_sum(array_column($assoc_array, 'key_name'));