如何在PHP中使用Json';iyas';

如何在PHP中使用Json';iyas';,php,Php,如何从中获得价值 我使用的php语言是无效的json。使用一些在线站点验证json,然后像这样尝试 $json = '{"status":200,"respSentence" :"iyas"}'; $array = json_decode($json, true); echo $array ['respSentence']; 您可以尝试使用和PHP函数 $url = "http://simsimi.com/........"; $data = file_get_contents($url);

如何从中获得价值

我使用的php语言是无效的json。使用一些在线站点验证json,然后像这样尝试

$json = '{"status":200,"respSentence" :"iyas"}';
$array = json_decode($json, true); 
echo $array ['respSentence'];

您可以尝试使用PHP函数

$url = "http://simsimi.com/........";
$data = file_get_contents($url);
$json = json_decode($data, true);
echo $json ['respSentence'];

希望对您有所帮助

非常糟糕的问题,请参见
“{”status:200,“respstence”11`:“respstence”}”
不是有效的json。对不起,我知道。但是,我使用的是手机上的网络堆栈。我英语不好,希望你能帮助我。你能帮我得到这个句子的价值吗?如何获取respstence的值?
$json=file\u get\u contents('http://simsimi.com/getRealtimeReq?uuid=VbQqwsQ3qiCw1T04VrrFQzBBlkfZibg3YFkbWz6VquZ&lc=id&ft=1&reqText=Eh+耶列克&状态=W’$array=json_decode($json,true);echo$array['respstence']-试试这个。我正在使用它,结果是:nullIt正在从我的本地。。。请检查您的配置和运行环境。