Re: [PHP] Removing key and value
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' ); // Jonas PHP Manual -> Variables Handling -> Unset -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing key and value
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-OC|8-/C|:-( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php