84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
有个数组
我想让红框里的键值连续0123456789而不是每次都重新0123,0123想道用array_merge重新整合,但是不知道循环该怎么写麻烦各位给个思路或者新的好方法
光阴似箭催人老,日月如移越少年。
function merge($prev, $now) { return array_merge($prev, $now['item_data']); } array_reduce($arr, "merge", array());
http://3v4l.org/uL6cS
function arr_merge($arr) { static $str; if (!is_array($arr)) { return $arr; } foreach ($arr as $key => $val ) { if (is_array($val)) { arr_merge($val); } else { $str[] = $val; } } return $str; }
http://3v4l.org/uL6cS