- array_slice: documentation ( source)
- end: documentation ( source)
- current: documentation ( source)
<?php
$array = array(1 => '5ive', 'jim' => 'bob', 4 => 5);
end($array);
echo 'Pointer is set to: ' . current($array) . "\n";
echo 'first item: ' . array_slice($array, 0, 1)[0] . "\n";
echo 'Pointer is set to: ' . current($array) . "\n";