Okay, here I have a multidimensional array. It consists of 3 arrays each with 3 numbers.
$numbers = array(
array("1", "2", "3"),
array("4", "5", "6"),
array("7", "8", "9"),
);
I want to generate and list every possible combination of the numbers from these arrays. So for example, "147" (1 being from the first array, 4 being from the second array and 7 being from the third array), "247, 347, 157, 257, 357, 167, 267, 367, etc..."
The important thing is that the first number must come from the first array, the second number from the second array and the third from the third array.
I have tried to loop through these arrays using nested foreach loops, but I can't quite figure it out and it's making my head spin. Hope that makes sense, any help would be greatly appreciated.