Resets an array pointer.
The internal pointer of an array can be reset to the first element with the reset() function. It also returns the first element of the array.
<?php
$array1 = array("one", "two", "three");
while ($element = current($array1)) {
print "$element ";
next($array1);
}
print "<br>" . reset($array1);
?>
one two three
one
After looping through the array, it is reset to the beginning using the reset() function.