$keys = range(1, 5); while(list($value, $key) = each($keys)) { if($key == 3) next($keys); echo $key . "\n"; }
1 2 3 5