The code below is too weird. I spent 15 min writing it but now works:
for(reset($ar),list($k,)=each($ar),$v=&$ar[$k];$k;list($k,)=each($ar),$v=&$ar[$k]){
var_dump($k,$v);
$v='ather'.($j+++0);
var_dump($k,$v);
}
The $ar array is generated in this way :
for ($i=0;$i<10;$i++){
$ar['foo'.$i] = 'bar'.$i;
}
Best regards,
Andrey Hristov
P.S.
There is in PHP's ToDo list such feature.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

