<?php
$countries = array("Brazil", "England", "Japan", "France");
// Get the current position
echo pos($countries); // print Brazil
// Go to next position
echo next($countries); // print England
// Current position
echo pos($countries); // print England
// Previous position
echo prev($countries); // print Brazil
// End Position
echo end($countries); // print France
// Current position
echo pos($countries); // print France