Re: [PHP] deleting array elements

2004-03-09 Thread Rob Ellis
On Tue, Mar 09, 2004 at 05:22:37PM -, Benjamin Jeeves wrote:
> Hi All 
> 
> I have two array one with a list of items in it. Then a second array with a list of 
> items in it what I want to be able to do is compare array1 to array2 and if a match 
> is found in both arrays delete that match from array1 and then so now? Any help 
> would be good.
> 
> so array1 = (1,2,3,4,5)
> array2 = (1,3,5)
> 
> then print array1 and the output be 2,4

$array1 = array_diff($array1, $array2);

- rob

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



[PHP] deleting array elements

2004-03-09 Thread Benjamin Jeeves
Hi All 

I have two array one with a list of items in it. Then a second array with a list of 
items in it what I want to be able to do is compare array1 to array2 and if a match is 
found in both arrays delete that match from array1 and then so now? Any help would be 
good.

so array1 = (1,2,3,4,5)
array2 = (1,3,5)

then print array1 and the output be 2,4

Thank you


RE: [PHP] Deleting Array elements

2001-11-02 Thread Daniel Kushner

Hi,

Try out this class: http://www.websapp.com/classes/LineRemover/

--Daniel


> -Original Message-
> From: HEW Staff [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 9:56 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Deleting Array elements
>
>
> I'm looking for some code that will enable me to remove a line
> from a file.
>
> I have .htaccess which is being filled by a subscription processor, I need
> to know how to remove a user from this file once the subscription
> has either
> been cancelled or subscription term complete.
>
> Any help appreciated.
> Thanks
> Jonno
>
>
>
> --
> 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]




[PHP] Deleting Array elements

2001-11-02 Thread HEW Staff

I'm looking for some code that will enable me to remove a line from a file.

I have .htaccess which is being filled by a subscription processor, I need
to know how to remove a user from this file once the subscription has either
been cancelled or subscription term complete.

Any help appreciated.
Thanks
Jonno



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