PHP分割数组

$new_arr = array_slice(explode(",",trim("1,2,3,4,5,6,7",",")),0,4);