My bad:
while (!feof($fp))
instead of what I wrote earlier.
- Original Message -
From: "Hugh Danaher" <[EMAIL PROTECTED]>
To: "Matt Palermo" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, June 05, 2003 10:59 PM
Subject: Re: [PHP] delet
en it again for writing, write the text to
the file, and then close it.
Hope this helps,
Hugh
- Original Message -
From: "Matt Palermo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 05, 2003 8:53 PM
Subject: [PHP] delete lines from text file
> Can
On Thursday 05 June 2003 11:53 pm, Matt Palermo wrote:
> Can anyone help me figure out how to search for a string in a text file,
> then delete the whole line of text that it occurs in?
>
> For example: I have a text file which contains the following.
>
> //** text.txt **
> Keep this line.
[PHP] delete lines from text file
Can anyone help me figure out how to search for a string in a text file,
then delete the whole line of text that it occurs in?
For example: I have a text file which contains the following.
//** text.txt **
Keep this line.
Also keep this line.
Delete
Can anyone help me figure out how to search for a string in a text file,
then delete the whole line of text that it occurs in?
For example: I have a text file which contains the following.
//** text.txt **
Keep this line.
Also keep this line.
Delete this line.
Keep this one too.
No
5 matches
Mail list logo