
<html>
<head>
<title>Navegar por una matriz</title>
</head>
<body>
<h1>Navegar por una matriz</h1>
<?php
$frutas=array("piña","pomelo","mandarina");
print_r($frutas);
echo"<br>"
echo "Actual: ",current($frutas),"<br>";
echo "Siguiente: ",next($frutas),"<br>";
echo "Previo: ",prev($frutas),"<br>";
echo "Final: ",end($frutas),"<br>";
echo "Reiniciando la matriz.<br>";
reset($frutas);
echo "Actual: ",current($frutas),"<br>";
?>
</body>
</html>