Display the drop-down list

array_slice()

« array_shift | array_splice »
<?php
$array 
array_slice (
    
// array $array
    
// int $offset
    
// [int $length = NULL]
    
?  // [bool $preserve_keys = false]
);
?>
Result
$array = [
  
=> 'c',
  
=> 'd',
  
=> 'e',
]
Examples
#1 array_slice  ([=> "a"=> "b"=> "c"=> "d"=> "e"],
 
2)
#2 array_slice  ([=> "a"=> "b"=> "c"=> "d"=> "e"],
 -
2,
 
1)
#3 array_slice  ([=> "a"=> "b"=> "c"=> "d"=> "e"],
 
0,
 
3)
#4 array_slice  ([=> "a"=> "b"=> "c"=> "d"=> "e"],
 
2,
 -
1)
#5 array_slice  ([=> "a"=> "b"=> "c"=> "d"=> "e"],
 
2,
 -
1,
 
true)
See also
array_chunk, array_splice