$str = str_replace(array('\\section*{', '}'), array('<title>', '</title>'), $str);
$str=str_replace('\\section*{','<title>',$str); $str=str_replace('}','</title>',$str);
<?php $str ="This is testing string with \section*{string} this tag."; $str = str_replace('\\section*{','<title>',$str); $str = str_replace('}','</title>',$str); echo $str; ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)