I have two simple PHP arrays, like so:
types = ['a', 'b', 'c']; // 3x1 array
numbers = [1, 2, 3]; // 3x1
What I want is to restructure the data (i.e. transpose + combine them) to be able to loop through them, like this:
result = [['a', 1], ['b', 2], ['c', 3]]; // 3x2
Is there a smart way to achieve this in PHP with some array_XXX native function or do I have to loop over both to manually compose it? Thanks.