RE: [PHP] Remove value from array

From: Date: Mon, 25 Jun 2001 11:39:16 +0000
Subject: RE: [PHP] Remove value from array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55131@lists.php.net to get a copy of this message
> Hello, > how can I complete remove an item out of an array ? > I tried unset() as well as setting the value to null. > > Both result in the value being null but not the item being deleted. As far as I know, this is not possible. You can, however, create a new array and copy all values except the deleted one from the old array, for example with two array_slice() calls. Argh, I'm not used to clicking reply and having to change the recipients adress =) Kristian

« previous php.general (#55131) next »