Search and replace a String in a file.

From: Date: Thu, 24 Jun 2004 16:58:08 +0000
Subject: Search and replace a String in a file.
Groups: php.general 
Request: Send a blank email to php-general+get-188973@lists.php.net to get a copy of this message
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!

« previous php.general (#188973) next »