Looking for a function in php for possible element combinations of unknown number of groups like {x, y...z}...{x,y...z} example:
A:{1,2,3,4},B:{5,6},C:{a,b,c}
Result:
ABC
15a
15b
15c
16a
16b
16c
25a
25b
25c
26a
26b
26c
35a
35b
.
.
.
46c
I just need something like this but this is not working
$array = array( 'A' => array(1, 2, 3, 4), 'B' => array(5, 6). 'C' => array('a', 'b', 'c'))
function makeCombinations($array){
foreach($array as $value){makeCombinations($array)
}
}