There's a PEAR package for just this. :-) http://pear.php.net/package/File_SearchReplace
On Thu, 24 Jun 2004 12:58:08 -0400, Eric L. Sammons <[EMAIL PROTECTED]> wrote: > > Being new to PHP this task seems to be little out of my reach right now. I > wonder if anyone could tell me how, as I read a file, line by line, search for > and then replace a given string? > > The lines in the file will appear as such: > > Summary: Some Summary > Name: Some-Name > Version: x.x > . > . > . > > Basically I will open the file, read its lines one by one and I want to > replace Some-Name with Some-other-Name. > > Thank you! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php