Skip to content
Advertisement

PHP multiply column of multidimensional array and get sum of result

Very basically you suppose I have this arrays:

JavaScript

and now I want to Multiply the numbers of columns, for example:

JavaScript

and get sum multiply of all calculation, for example:

JavaScript

I need to get this result, I can’t implementing this scenario with array_map or array_reduce, using two foreach return wrong result for me

Advertisement

Answer

Try This..

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement