reset(3) php man page | unix.com

Man Page: reset

Operating Environment: php

Section: 3

RESET(3)								 1								  RESET(3)

reset - Set the internal pointer of an array to its first element

SYNOPSIS
mixed reset (array &$array)
DESCRIPTION
reset(3) rewinds $array's internal pointer to the first element and returns the value of the first array element.
PARAMETERS
o $array - The input array.
RETURN VALUES
Returns the value of the first array element, or FALSE if the array is empty.
EXAMPLES
Example #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 ALSO
current(3), each(3), end(3), next(3), prev(3). PHP Documentation Group RESET(3)
Related Man Pages
array_shift(3) - php
array_push(3) - php
array_count_values(3) - php
array_product(3) - php
current(3) - php
Similar Topics in the Unix Linux Community
how to spilit a row into fields and store the field content to the array
Attaching HDS External storage to AIX Servers
Pointers and array
How to swap the values in array using for loop?
Run the Script from any stage by updating data from Oracle Table.