Re: How to remove a variable from an array

From: Date: Mon, 03 Nov 2003 02:03:31 +0000
Subject: Re: How to remove a variable from an array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168364@lists.php.net to get a copy of this message
On Sun, 2 Nov 2003 14:06:31 -0500, you wrote: >I have an array variable that is set, then put into a session >variable. All is good so far, but how can I remove a specific variable >from the array? unset() >I have tried basically copying and pasting this, and adding a foreach >loop. Inside this foreach loop, the array is split apart and I tried >using unnset, but I couldn't get it to work, so I deleted the code. unset ($array[$index]) http://uk.php.net/unset

« previous php.general (#168364) next »