
01.03.2010, 14:11
|
|
Members of Antichat - Level 5
Регистрация: 09.05.2008
Сообщений: 304
Провел на форуме: 7875940
Репутация:
2362
|
|
http://ru2.php.net/manual/en/control-structures.foreach.php
Note: Unless the array is referenced, foreach operates on a copy of the specified array and not the array itself
Поэтому:
PHP код:
$keys = range(1, 5);
while(list($value, $key) = each($keys)) {
if($key == 3)
next($keys);
echo $key . "\n";
}
Результат:
__________________
включи голову
|
|
|