【发布时间】:2015-09-12 23:07:33
【问题描述】:
找到我的 Json 代码。
$result = {
"text_1":
[
{
"text": "Name \nKarSho",
"left": 0,
"right": 0
}
]
}
我想要 PHP 中这个 Json 的“文本”。我使用了以下脚本,
$json = json_decode($result,true);
if($json && isset($json['text_1']))
{
$textblock =$json['text_1'][0];
echo $textblock['text'];
}
这是给予,
名字KarSho
但我想要,
名称\nKarSho
怎么办?
【问题讨论】:
-
你需要显示这样的名字 KarSho