-4
3組合,我將以下數組結合起來: 這個陣列會與自身結合PHP生成從陣列
Array (
[0] => Array
(
[0] => 1
[1] => 2
)
[1] => Array
(
[0] => 1
[1] => 3
)
[2] => Array
(
[0] => 1
[1] => 4
)
[3] => Array
(
[0] => 2
[1] => 3
)
[4] => Array
(
[0] => 2
[1] => 4
)
[5] => Array
(
[0] => 3
[1] => 4
)
);
後組合會產生這樣的陣列:
Array (
[0] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
[1] => Array
(
[0] => 1
[1] => 2
[2] => 4
)
[2] => Array
(
[0] => 2
[1] => 3
[2] => 4
)
);
例如從1.2與1.3組合將產生1,2,3或1,2與1,4 = 1,2,4
我試過了,但結果是太多和不規則。謝謝 –
使組合 –
它應該只返回3個嵌套項目(如上所示)? – RomanPerekhrest