Re: Removing key and value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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|:-(

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux