i have a code giving me possible combinations, but its missing the combinations of each array. please let me know how i can generate the combinations of each array as well. like after running stated code i will get possible combinations….but i need the combinations like (rough,medium,small) as well…..
$array1 = array('rough', 'smooth', 'coarse');
$array2 = array('shiny', 'matte', 'rough');
$array3 = array('very large', 'large', 'medium', 'small');
foreach($array1 as $i)
foreach($array2 as $j)
foreach($array3 as $k)
$output[] = "$i, $j, $k";
var_dump($output);
This outputs every possible combination of all the values, without repeating any. As shown below: