I have asked a question in this post
but it might look some confusing and I found no relative response, so I make it quiet simple.
The code is:
<?php
$newTitle = 'string retrieved from somewhere';
fwrite($newFile, "<title>oldTitle</title>\n");
?>
I want to replace oldTitle
with $newTitle
I have tried this:
$myTitle = preg_replace('/(<title>)(.*?)(<\/title>)', $newtitle, $myTitle);
Thanks