- reset: documentation ( source)
- current: documentation ( source)
<?php
$a = array(1, 2, 3, 4, 5, 6, 7, 8, 9);
reset ($a);
foreach ($a as $v) {
echo('Array points to: ' . current($a) . ' foreach() is at element: ' . $v . "\n");
}
echo('After loop array points to: ' . current($a));