Example JSON Response $json_data = '{ "stat": "ok", "profile": { "providerName": "testing", "identifier": "http://testing.com/58263223", "displayName": "testing 1", "preferredUsername": "testing 2", "name": { "formatted": "testing" }, "url": "http://testing.com/testing/", "photo": "https://securecdn.testing.com/uploads/users/5826/3223/avatar32.jpg?1373393837", "providerSpecifier": "testing" } }'; Alternative 1 (returns object format) $data = json_decode($json_data); echo $data->profile->displayName; // outputs testing 1 echo $data->profile->preferredUsername;// outputs testing 2 Alternative 2...
Comments
Post a Comment