Re: foreach / unset

From: Date: Thu, 27 Oct 2005 23:59:23 +0000
Subject: Re: foreach / unset
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-224748@lists.php.net to get a copy of this message
Why should this be "unsafe" (whatever the heck that means) in any way? Of course you can do it. Regards, Niels. [sorry for mailing to your private address. wrong button :)] > Anyway, can you do *this* safely as a DOCUMENTED FEATURE: > > foreach($array as $k => $v){ >   if (...) unset($array[$k]); > }

« previous php.general (#224748) next »