1
Well, I’ll try to explain a little better as you requested.
I own 3 arrays
simple, I’m using an example with 3 arrays
, but actually the number of arrays
is not defined as they are mounted from 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]
And 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 better if it could be done in JS
but it may be for PHP
also.
It is not very clear which is the combination rule of Phlegm, can describe to us?
– BrTkCa
And you want in JS or PHP?
– Woss
I made some corrections to explain better.
– Fleuquer Lima