Remove array elements
$arr = array( "Orange", "Cherry", "Apple", "Banana", "Lemon" );
$first = array_shift( $arr );
$last = array_pop( $arr );
sort( $arr );
foreach( $arr as $value){ echo("$value, ");}
echo("
Removed first element: $first");
echo("
Removed last element: $last");
?>