There's a code in the software that I'm modifying, which looks <?php echo $str;>
that have an output of http://old.example.com/12345-title.html and when I tried to modify the string with this https://stackoverflow.com/a/1252710/2007055 technique it didn't work..
And I find out when I do echo "TEST" . $str;
it returns a different output which looks like TEST-0/posts/11-cat/22-sub-cat/12345-title.html but returns "http://old.example.com/12345-title.htmlTEST" when I do echo $str . "TEST";
..
My question is how can I modify that kind of a string? From "http://old.example.com/12345-title.html" into "http://www.example.com/12345-title.html" ?