beginner
Date: 04/18/06
(PHP Community) Keywords: no keywords
Hi, I'm a beginner so my question might sound stupid, but I couldn't found the answer anywhere. Please help!
I know I can append some content to a .txt file if I fopen(a+) it and then fwrite. But how could I change/overwrite part of a .txt file, or delete one line of it? I couldn't find a function that'll do the job.
For example, if I have a file called "a.txt", and it looks like:
This is the first line| Sencond sentence
This is the second line| 4th sentence.
How can I
find and change "4th" into "fourth"?
delete the first line and write in another line?
Source: http://community.livejournal.com/php/439972.html