Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<body>
<?php
$input = array("a", "b", "c", "d", "e");
$output1 = array_slice($input, 2);
$output2 = array_slice($input, -2, 1);
$output3 = array_slice($input, 0, 3);
print_r($output1);
echo "<br>";
print_r($output2);
echo "<br>";
print_r($output3);
?>
</body>
</html>
The most helpful PHP solutions
detect browser phpPHP Click to see more ... 4.6K 408