1.PHP截取数组的长度

$new_arr=array_slice($old_arr,0,20);

注:截取数组$old_arr的前20个,保存到数组$new_arr中。