(PHP 3, PHP 4, PHP 5)
reset() rebobina el puntero interno de la matriz a su primer elemento. Y regresa el valor de ese elemento, o FALSE si la matriz está vacía.
Ejemplo 1. Ejemplo de reset()
<?php$array = array('step one', 'step two', 'step three', 'step four'); // by default, the pointer is on the first element echo current($array) . "<br />\n"; // "step one"// skip two steps next($array); next($array);echo current($array) . "<br />\n"; // "step three" // reset pointer, start again on step onereset($array);echo current($array) . "<br />\n"; // "step one" ?>
Vea también: current(), each(), next() y prev().