嗨,在 array_merge 和 array_splice 中需要帮助,例如,如果数组包含 10 个元素,则在应用逻辑合并数组后需要拼接前 6 个
$input = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
$array1 = array_splice($input ,0, 6); // $input is now $array1 = array(1, 2, 3, 4, 5)
// $array = unset($array1[4]); example for logic
// how to merge $array1 to remaining array value which was spliced
O/P: array(1, 2, 3, 5, 6, 7, 8, 9, 10);