Hi I am having trouble with a certain character in PHP. the character is “ which should return
“
but when I do
echo htmlentities('“');
I get
�
What Am I doing wrong??
看来您的文件格式为utf-8,而php版本小于5.4,因此请告诉htmlentities。
echo htmlentities('“', ENT_COMPAT | ENT_HTML401, "UTF-8");
Try using online interpreter like this one codeonline .
It returned the quote (") without an issue in my case. For further documentation, check documentation:
http://php.net/manual/en/function.htmlentities.php
(FYI, more sandbox tools can be found in this thread ).
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.