不能在mysql中将商标符号显示为html [英] cannot display trademark symbol in mysql to html
问题描述
我是php / mySQL的入门者,目前我正面临一个问题,在我的html上显示符号(如®)。该符号存储在一个表格中,当从phpmyadmin查看时,该表格可以正确显示,但是当我使用php检索表格内容时,它不显示符号,而是显示带有?符号的菱形符号。在里面。我已经将html页面设置为utf-8,将我的表格设置为utf8_general_ci,但没有运气。
当我直接输入html或甚至在php变量中存储。
我用来获取内容的查询是
while( $ row = mysql_fetch_array($ result)){
echo($ row [symbol]);
}
预先致谢您可以使用html字符实体而不是直接符号
不要使用
试试看
& reg;
I am a starter in php/mySQL, and I am currently facing a problem to display symbol such as ® onto my html. The symbol is stored in a table which can display properly when viewed from phpmyadmin, but when I use php to retrieve the table content, it does not display the symbol but instead displaying a symbol of a diamond with a ? inside it. I have set the html page to utf-8 and my table to utf8_general_ci but no luck from those.
The symbol is able to display correctly when I put straight to html or even store in php variable.
The query I used to get the content is
while ($row = mysql_fetch_array($result)){
echo ($row["symbol"]);
}
Many thanks in advance
You can use html character entities instead of direct symbol
Do not use
®
Try it
®
这篇关于不能在mysql中将商标符号显示为html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!