Well, I'll try to explain a little better as you asked.
I have 3 arrays
simple, I'm using an example with 3 arrays
, but in fact the arrays
number is not set, since they are set from the user's choices, so I can have 2 to 5 arrays depending on what the user chooses. But most would be 3 arrays
:
(Decreases the size of array
to make it easier to understand)
[A,B]
[1,2]
[x,y]
I need to make a combination between them so that something like:
[A,1,x]
[A,1,y]
[A,2,x]
[A,2,y]
[B,1,x]
[B,1,y]
[B,2,x]
[B,2,y]
The output must be a new array
with the relation between all the values of the previous ones. It would be best if it could be done in JS
but could be PHP
as well.