特定の要素の取得に関する問題、緊急
{"head":[{"visitcode":"sjbtg","resultCode":"0"}],"content":[{"userID":"15611030868", " productID":"3111007900 ","orderTime":"2012-06-19","orderType":"1","orderresult":"6","orderremark":"入力された商品IDは存在しません", "baseLine ":"","orderField":""},{"userID":"","productID":"","orderTime":"","orderType":"1","orderresult":" 1" ,"orderremark":"必須パラメータが空です","baseLine":"","orderField":""},{"userID":"","productID":"","orderTime":" " ,"orderType":"1","orderresult":"1","orderremark":"必須パラメータが空です","baseLine":""}]}
の取得方法 " orderresult" ": "6" の値、つまり 6
-----解決策-----------
$s = '{"head":[{"visitcode":"sjbtg","resultCode":"0"}],"content":[{"userID":"15611030868","productID":"3111007900 " ,"orderTime":"2012-06-19","orderType":"1","orderresult":"6","orderremark":"入力された商品IDは存在しません","baseLine":"", " orderField":""},{"userID":"","productID":"","orderTime":"","orderType":"1","orderresult":"1","orderremark": " 必須の入力パラメータは空です","baseLine":"","orderField":""},{"userID":"","productID":"","orderTime":"","orderType": " 1","orderresult":"1","orderremark":"必須パラメータが空です","baseLine":""}]} ';
echo json_decode($s)-> content[0]->orderresult; //6
------解決策---------