The array_slice function extracts a slice of an array given a starting index number.

    
    $states = ['Idaho', 'Texas', 'Maine', 'Vermont'];

    $statesSlice = array_slice($states, 2);

    print_r($statesSlice);
    // Array ( [0] => Maine [1] => Vermont )