[英]™ from database not showing symbol
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. 也许这可以为你尝试用@wild提到的代码替换和交易。
$string = "™ here is a string";
$search = "™";
$replace = '™';
echo str_replace($search, $replace, $string);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.