$arr = array(
'slidelink' => 'presentation.pptx',
'productid' => array(1,3),
'order' => 2,
'class_id' => array(1,2),
'currency_id' => array(1,2),
'presentation_type' => 1,
'distribution' => 0,
)的陣列生成所有可能的變型;
我想生成的所有可能輸出到一個新的數組,所以在這種情況下,8行,如:
$new_arr = array (
0 => array(presentation.pptx, 1, 2, 1, 1, 1, 0),
1 => array(presentation.pptx, 1, 2, 1, 2, 1, 0),
2 => array(presentation.pptx, 1, 2, 2, 1, 1, 0),
3 => array(presentation.pptx, 1, 2, 2, 2, 1, 0),
4 => array(presentation.pptx, 3, 2, 1, 1, 1, 0),
5 => array(presentation.pptx, 3, 2, 1, 2, 1, 0),
6 => array(presentation.pptx, 3, 2, 2, 1, 1, 0),
7 => array(presentation.pptx, 3, 2, 2, 2, 1, 0)
);
我該怎麼辦呢?
謝謝!
你到目前爲止嘗試過什麼? – Dekel