I have an array like
$arr = array(
[1,2,3],
[4,5,6,7,8]
);
I want print the result as a permutation,
1,4
1,5
1,6
1,7
1,8
2,4
2,5
2,6
2,7
2,8
3,4
3,5
3,6
3,7
3,8
I tried but more confusing for me. This is just simple array, here it has only 2 inner arrays, but it may be more.