In my database, some products have a ™ symbol next to them. This is recorded in the database by ™
. However when I echo this out from the database, it literally prints out ™
instead of the actual ™ symbol.
Any ideas on how I can avoid this and get it to actually display the symbol?
在要打印TM的地方使用此代码
echo '™';
May be this can work for you try replacing &trade with the code mentioned by @wild.
$string = "™ here is a string";
$search = "™";
$replace = '™';
echo str_replace($search, $replace, $string);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.