Re: Removing key and value

From: Date: Thu, 04 May 2006 10:33:42 +0000
Subject: Re: Removing key and value
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-235465@lists.php.net to get a copy of this message
On Thu, 4 May 2006, Jonas Rosling wrote: > How's the best way to remove a key and it's value from an array? Like in the > code bellow where I would like to remove AK and it's value. > > $salesperson = array( > 'AK' => '1000', > 'AT' => '1500', > 'BT' => '2000' > ); unset($salesperson['AK']); See http://www.php.net/unset for more. Cheers, -- --Jyry C|:-( C|:-/ C|========8-O C|8-/ C|:-(

« previous php.general (#235465) next »