- reset: documentation ( source)
- array_keys: documentation ( source)
- next: documentation ( source)
<?php
$x = array(0 => 1, 2 => 3, 4 => 5, 6 => 7, 8 => 9);
foreach (array_keys($x) as $key => $value) {
echo $key . "->". $value."\n";
}
echo next($x)."\n";
echo next($x)."\n";
$y = $x;
echo next($y)."\n";
echo next($y)."\n";
reset($y);
echo next($x)."\n";
echo next($y)."\n";