//The part of the divided group that can be divided into the number of elements in the array
$firstLength = $enum * $groupNum;
$firstArray = array();
for($i=0 ; $i<$firstLength; $i++){
array_push($firstArray, $array[$i]); i=0; $i<$groupNum; $i++){
//Intercept elements from the specified starting position and length in the original array and put them into the new array. $firstArray, $start, $enum);
//The starting position plus the number of accumulated elements
加到结果集的前几项中
$secondLength = $allLength - $firstLength;
for($i=0; $i<$secondLength; $i++){
array_push($result[$ i], $array[$i + $firstLength]);
}
}else{
for($i=0; $i<$allLength; $i++){
$result[ ] = array_slice($array, $i, 1);
}
}
return $result;
}
http://www.bkjia.com/PHPjc/825231.html
true