I have two array one is 1 to 8 number of cards and four colors of cards.
Code: Select all
$no = array(1, 2, 3, 4, 5, 6, 7, 8);
$color = array('K','L','F','C');
Code: Select all
Array(
1-K
2-K
3-K
...
1-F
2-F
3-F
...
)
Code: Select all
$no = array(1, 2, 3, 4, 5, 6, 7, 8);
$color = array('K','L','F','C');
Code: Select all
Array(
1-K
2-K
3-K
...
1-F
2-F
3-F
...
)
Code: Select all
$no = array(1, 2, 3, 4, 5, 6, 7, 8);
$color = array('K','L','F','C');
$result = array();
foreach ($no as $n) {
foreach ($color as $c) {
$result[] = $n .'-'. $c;
}
}
var_export($result);