时间:2021-07-01 10:21:17 帮助过:8人阅读
上面还要输出一个ACB,BAC,BCA,CAB,CBA
也就是
Array ( [0] => A [1] => AB [2] => AC [3] => ABC [4] => ACB [5] => B [6] => BA [7] => BC [8] => BAC [9] => BCA [10] => C [11] => CA [12] => CB [13] => CBA [14] => CAB )
迪尔卡积又来了?请查看精华区
$ar = array('A', 'B', 'C');$res = array_chunk($ar, 1);for($i=1; $iArray
(
[0] => A
[1] => B
[2] => C
[3] => AB
[4] => AC
[5] => BA
[6] => BC
[7] => CA
[8] => CB
[9] => ABC
[10] => ACB
[11] => BAC
[12] => BCA
[13] => CAB
[14] => CBA
)
0) { for($i=0;$i输出结果?>