Description
mixed
reset ( array array)
reset() rewinds array's
internal pointer to the first element and returns the value of the first
array element.
Example 1. reset() example |
<?php
$array = array('step one', 'step two', 'step three', 'step four');
echo current($array) . "<br />\n"; next($array);
next($array);
echo current($array) . "<br />\n"; reset($array);
echo current($array) . "<br />\n"; ?>
|
|
See also current(),
each(), next(),
and prev().