Just found this in the manual notes

http://www.php.net/manual/en/ref.array.php

To delete an element from an array in an easy way, use
unset($array["element"]);...

Funny those... manuals

M: 

> -----Original Message-----
> From: David Yee [mailto:[EMAIL PROTECTED]]
> Sent: 30 October 2001 19:03
> To: [EMAIL PROTECTED]
> Subject: [PHP] Quick array question
> 
> 
> Hi.  Is there an array function that deletes an array element 
> (that's not at the beginning or the end of the array) and return 
> the resultant array?  E.g. this is what I want to do:
> 
> $a = array(1, 2, 3, 4, 5);
> 
> $b = array_element_delete_function($a, 2);
> 
> $b now has 4 elements with the following values: (1, 2, 4, 5)
> 
> Thanks.
> 
> David
> 

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