There are two arrays:
$arr1 = array(1,2,3);
$arr2 = array(0,0,1);
I need to make pairwise subtraction of these two arrays. The result for arr1 – arr2 should be:
$arr3 = array(1,2,2).
Do I need to use FOR loop to to this or is there any quicker way?
How about this function?
So you can do: