Re: Deleting Array elements
| From: | Liz Fulghum | Date: | Sat, 03 Nov 2001 04:04:26 +0000 |
| Subject: | Re: Deleting Array elements | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73322@lists.php.net to get a copy of this message | ||
One idea is to read the file into an array, use substr to match the
existance of the user to be deleted, and if the user isn't to be deleted,
read the line into a new array, then write the new file to the array.
"Hew Staff" <hewweb@hardiman-e-worldwide.com> wrote in message
news:20011103025639.97502.qmail@pb1.pair.com...
> 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
>
>