I have n
arrays (for example 2 arrays):
$tab['1'] = array('1', '2', '3');
$tab['2'] = array('A', 'B', 'C');
How can i get this result?
1 A
1 B
1 C
2 A
2 B
2 C
3 A
3 B
3 C
That is, each element from first array with each element from other arrays.
array_product
does this. But on a second look you notice that it actually multiplies the number of the array. Bleh, PHP. Because you have to multiply all elements in an array that often!