时间:2021-07-01 10:21:17 帮助过:4人阅读
得到的结果是:
代码如下:
Array
(
[0] => Array
(
[0] => 2
[1] => 1
[2] => 1
)
[1] => Array
(
[0] => 3
[1] => 1
[2] => 1
)
[2] => Array
(
[0] => 4
[1] => 1
[2] => 1
)
[3] => Array
(
[0] => 1
[1] => 2
[2] => 2
)
http://www.bkjia.com/PHPjc/736789.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/736789.htmlTechArticle 代码如下:function arrange($arr){ $new_arr = array(); $c = count($arr); foreach($arr as $key=$vo){ $lin = $arr; array_splice($lin,$key,1); for($l=0;$l$c-1;$l++){ $...