public static function arrOper ( $arr, $num ) { $count = count ( $arr ); $return_arr = []; for ( $i = 0; $i < $count / $num; $i ++ ) { $return_arr[$i] = array_slice ( $arr, $num * $i, $num); } return $return_arr; }
说明:$arr被分割数组 $num 要分割数
原文地址:https://www.cnblogs.com/dereckbu/p/9698710.html
时间: 2024-10-04 00:55:48