Query: reset
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
RESET(3) 1 RESET(3) reset - Set the internal pointer of an array to its first elementSYNOPSISmixed reset (array &$array)DESCRIPTIONreset(3) rewinds $array's internal pointer to the first element and returns the value of the first array element.PARAMETERSo $array - The input array.RETURN VALUESReturns the value of the first array element, or FALSE if the array is empty.EXAMPLESExample #1 reset(3) example <?php $array = array('step one', 'step two', 'step three', 'step four'); // by default, the pointer is on the first element echo current($array) . "<br /> "; // "step one" // skip two steps next($array); next($array); echo current($array) . "<br /> "; // "step three" // reset pointer, start again on step one reset($array); echo current($array) . "<br /> "; // "step one" ?>SEE ALSOcurrent(3), each(3), end(3), next(3), prev(3). PHP Documentation Group RESET(3)
Related Man Pages |
---|
array_pop(3) - php |
array_count_values(3) - php |
arsort(3) - php |
prev(3) - php |
next(3) - php |