$sum = collect($matrix)->flatten()->sum();
Sep 16, 2021
4
Level 2
Sum of array
$matrix = array( [1,2,3,4,5,6,8], [1,2,3,4,5,6,2], [1,2,3,4,5,6,1], [1,2,3,4,5,6,3] );
sum of array
[1,2,3,4,5,6,8], [2,3,4,5,6], [3,4,5] [4]
like sum this
Please or to participate in this conversation.