Replace HTML-encoded symbol (™) in PHP string

Solution:1

What about this:

<title><?php print str_replace("&trade;", "™", $yourStr); ?></title>

Actually I don´t know is it the best way to do this, but at least it works.

Solution:2

As I understand it you want to replace the ‘&trade;‘ with ‘(tm)’ in a string in PHP. You can just use the str_replace() function for that.

It would look something like this

$titleString = "SOME TITLE - Trademark &trade; My Company";
$titleStringReplaced = str_replace("&trade;", "(tm)", $titleString);