$ch = curl_init('http://www.somesite.com/project/User?id=1&&user=MYUSER');
$result = curl_exec($ch);
print $result;
curl_close($ch);
$json=json_decode($result,true);
print "-->".$json;
print "------>".$json['PASSWORD'];`
我得到的输出是:JSON解码在PHP失败使用curl
-->1
------>
什么是 “1”,也就是接近尾声附加?我如何解决它?
尝试'print_r'而不是'print'为你的'$ json'数组 – 2013-03-05 17:51:47