Replace pieces in long text
| From: | Thijs Wijnmaalen | Date: | Tue, 20 Jan 2004 19:05:47 +0000 |
| Subject: | Replace pieces in long text | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-22623@lists.php.net to get a copy of this message | ||
Hi,
I have a system written in PHP, where users can manage their own template-file. I'm using ETS (http://ets.sourceforge.net) to parse the templates. And I want to have a ETS-var added to the template every time a user modifies his template. {/main} must be replaced with {disclaimer}{/main} and then saved.
This is what i've done so far, but it won't work :(
$content = str_replace("\{disclaimer\}\{/main\}", "\{/main\}", $content);
$content = str_replace("\{/main\}", "\{disclaimer\}\{/main\}", $content);
Could anybody help?
Thanks,
Thijs