Actually this is a string,
How can i convert it to object or array ..
{"kind": "delivery_quote", "fee": 750, "created": "2016-02-28T19:13:38Z", "expires": "2016-02-28T19:18:38Z", "currency": "usd", "duration": 60, "dropoff_eta": "2016-02-28T20:18:38Z", "id": "dqt_KhC5sbjq00Jn6F"}
I tried this
$array=explode(' ',$result);
$json = json_encode($result);
print($json);
It is giving me the result like this
"{\"kind\": \"delivery_quote\", \"fee\": 750, \"created\": \"2016-02-28T19:13:38Z\", \"expires\": \"2016-02-28T19:18:38Z\", \"currency\": \"usd\", \"duration\": 60, \"dropoff_eta\": \"2016-02-28T20:18:38Z\", \"id\": \"dqt_KhC5sbjq00Jn6F\"}"
But how can i do this properly so that i can take the results like
echo $json->fee;
Here is the Eval of what i have so far.
Help pls
json_decodejson_decode?