Copy the codeThe code is as follows:
/*
Use the example in the manual
*/
$input = array ("a", "b", "c", "d" , "e");
$output = array_slice ($input, 2); // returns "c", "d", and "e",
$output = array_slice ($input, 2, -1); / / returns "c", "d"
$output = array_slice ($input, -2, 1); // returns "d"
$output = array_slice ($input, 0, 3); // returns "a" , "b", and "c"
?>
The above introduces the use of array_slice php array_slice function and detailed explanation of parameters, including array_slice content. I hope it will be helpful to friends who are interested in PHP tutorials.