i have two arrays and i want to make calculations with the elements in these arrays.
$result1=DB::where('elements',$elements)->get();
$result2=DB::where('otherElements',$otherElements)->get();
for example; $result1 = [5,7,9] and $result2 = [0,5,9]
$result3 must be (for multiply) [0,35,81] or (for sum) [5,12,18]
i tried to do with for loop but it does not solve my problem in blade file.
so i want to do it in controller then send the result to the blade file.
array_productorarray_sumfunction from php to add or multiply two arrays