作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在 mysql 数据库中编写一个包含波斯字符串的 php json 网络服务。这是我的 table :
这是我的代码:
结果是:
如果您看到结果,您会看到波斯字符串显示为数字和反斜杠。为什么?我尝试任何代码来调试它,但无法做到。请帮助解释为什么波斯语字符串显示不正确。
最佳答案
在json_encode中设置unescape选项即可
JSON_UNESCAPED_UNICODE (integer) Encode multibyte Unicode characters literally (default is to escape as \uXXXX). Available since PHP 5.4.0. http://php.net/manual/en/json.constants.php
json_encode(array('Cinema' => $cinemas), JSON_UNESCAPED_UNICODE );
关于php - 带有 JSON 结果的 PHP 中的波斯语字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22744976/
我使用 Highcharts 绘制一些图表。我的语言是波斯语(波斯语),我想用波斯数字绘制图表。但是在 Highcharts 中,所有数字都以英文显示。 有没有办法用波斯语显示数字(所有数字:yaxi
我是一名优秀的程序员,十分优秀!