This is a good one I just learned last week -- unset the variable.  That 
is,

unset($Arr[2]);

or

unset($Arr['cyanide']);

from what I understand, the discovery of this easy way to do this was 
accidental.  See the second annotation of "array_splice()" in the PHP 
manual here for the details:  
http://www.php.net/manual/en/function.array-splice.php




On Wednesday, January 16, 2002, at 05:05  PM, phantom wrote:

> $Str = apple,orange,cyanide,bananna
> $Arr = split(",",$Str);
>
> How do I remove the unwanted value from the array?
> (in this example, Cyanide ($Arr[2]) from the Fruit array)???
>
> Thanks.
>
> array_splice()???
>
>
> --
> 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]
>


-- 
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]

Reply via email to