阅读特殊字符,如注册商标 [英] Read Special Character like Register trademark

查看:34
本文介绍了阅读特殊字符,如注册商标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下语句来读取值并且它运行良好.

I use following statement for read the value and its works well.

$PlaceName=$_REQUEST['PlaceName'];

但是上面的语句有一个问题.如果我们传递一些特殊类型的字符(如 Burger King ®),则变量 $PlaceName 包含空白值.注意这个问题的原因是注册商标符号(®)

but here is one problem with above statement. If we pass some special type character (like Burger King ®), then variable $PlaceName contains blank value. Note that the reason of this problem is the symbol of registered trademark (®)

那么如何通过更正上述语句在 PHP 中读取这种类型的符号?

So how can I read this type of symbol in PHP by correcting above statement?

推荐答案

你可以试试

header('Content-Type: text/html; charset=utf-8');
$PlaceName= "Burger King ®" ;
echo $PlaceName;

这篇关于阅读特殊字符,如注册商标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆