Suppose that I have two arrays, and I want to add the corresponding elements.
$v_4 = [
[1, 2, 3],
[4, 5, 6],
];
$v_5 = [
[7, 8, 9],
[10, 11, 12],
];
How should I construct an addition function to add across these arrays to get:
[
[8, 10, 12],
[14, 16, 18],
]
I know I need to utilise array_map
somehow, but I am unsure how to proceed in this multidimensional case.