reset() rewinds the internal pointer of the array back to the first element. : reset « Data Structure « PHP






reset() rewinds the internal pointer of the array back to the first element.

 
Its syntax: mixed reset (array array)

<?
    $spices = array("A", "B", "C", "D", "E");
    reset($spices);
    $a_spice = each($spices);
    print_r($a_spice[1]);
    print_r($a_spice["value"]);
?>
  
  








Related examples in the same category