PHP:获取"SSA' s"而不是"SSA" [英] PHP: getting "SSA's" instead of "SSA's"
本文介绍了PHP:获取"SSA' s"而不是"SSA"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用PHP从数据库显示某些数据时遇到问题.
Im having a problem displaying certain data with PHP from the database.
其当前显示方式-"SSA' s"
How its currently showing - "SSA's"
应如何显示"SSA"
How it should show "SSA's"
HTML元标记
meta charset="UTF-8">
PHP代码
$article_title = html_entity_decode(mb_convert_encoding(stripslashes($r->ArticleTitle), "HTML-ENTITIES", 'UTF-8'));
推荐答案
您可以使用html_entity_decode()
或htmlspecialchars_decode()
基本示例:
$string = html_entity_decode("SSA's");
echo $string; // result SSA's
$string = htmlspecialchars_decode("SSA's");
echo $string; // result SSA's
这篇关于PHP:获取"SSA' s"而不是"SSA"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文