JSON decode with PHP: Key started with @ sign -
json like
{ "@http_status_code": 200, "@records_count": 200, "warnings": [], "query": { ... ...
in php
$data = json_decode($json_entry); print $data->@http_status_code; //returns error print $data->http_status_code; //returns nothing
how can retrieve status code?
try json_decode json in form of array ..
$json_array = json_decode($data, true); $required_data = $data['required_key']
with reference particular problem .. array
array ( [@http_status_code] => 200 [@records_count] => 200 [warnings] => array ( ) .... )
so can access data $data['@http_status_code']
Comments
Post a Comment