[PHP] sytax to remove specifc item in string-indexed array???

2001-12-16 Thread Vincent Ma

Hi everyone:

  I would like to know how to specific item in array.  For the add new item
to array, we know just :

   $array += array($key = $value);

How to remove specific item in array???

  I tried --  $array -= ($key = $value);
 Don't work... _.

Before, i saw some code in other website, they used...

  $array[$index] -= $value -- to remove???
 ### i think this just work to number-indexed array
   not for string-indexed array


Thank for you help

Vincent Ma




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sytax to remove specifc item in string-indexed array???

2001-12-16 Thread Michael Sims

At 05:53 PM 12/14/2001 +1100, Vincent Ma wrote:
Hi everyone:

   I would like to know how to specific item in array.  For the add new item
to array, we know just :

$array += array($key = $value);

How to remove specific item in array???

unset(array[specific_item_index]);

...has always worked for me.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]