RE: [PHP] Search and replace a String in a file.
| From: | Jay Blanchard | Date: | Thu, 24 Jun 2004 17:05:03 +0000 |
| Subject: | RE: [PHP] Search and replace a String in a file. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-188975@lists.php.net to get a copy of this message | ||
[snip]
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?
Basically I will open the file, read its lines one by one and I want to
replace Some-Name with Some-other-Name.
[/snip]
http://www.php.net/str_replace