So you have an array
$input = ["red", "green", "blue", "yellow"];
array_slice
Running array_slice($input, 2) would return you the part that you're requesting by the $offset (2) and $length - the 3d parameter that you've omitted (which would mean as many as there's left). Also the interesting thing here is that the $input is getting passed not by reference, meaning that it's going to be left unchanged.
$result = array_slice($input, 2);
// $input == [0 => "red", 1 => "green", 2 => "blue", 3 => "yellow"];
// $result == [0 => "blue", 1 => "yellow"];
There's an optional 4th parameter to preserve the keys, which would mean the returned keys are unchanged.
$result = array_slice($input, 2, null, true);
// $result == [2 => "blue", 3 => "yellow"];
array_splice
This function is similar to array_slice, except this time the array is passed by reference. So the function can change the initial array now. Additionally the 4th parameter is accepting an array that should replace the sliced part (if omitted it just means that that part is replaced with an empty array).
$result = array_splice($input, 2);
// $input = [0 => "red", 1 => "green"];
// $result == [0 => "blue", 1 => "yellow"];
$result = array_splice($input, 2, null, ["brown", "black"]);
// $input = [0 => "red", 1 => "green", 2 => "brown", 3 => "black"];
// $result == [0 => "blue", 1 => "yellow"];
array_splicereturns the part you take out. Look into the$inputvariable instead. Tip: If you're not sure about a function in PHP, read the manual entry: php.net/array_splice