Boundary Elements in PHP
Given an array:
<?php
$arr = [1, 2, 3, 4, 5];
?>
Display its first and last element, and do it in such a way that they are removed from the original array.
Given an array:
<?php
$arr = [1, 2, 3, 4, 5];
?>
Add an element 0 to its beginning, and
an element 6 to the end.