First check your json string in http://jsonlint.com it's invalid json.
Check the following example:
<?php
$jsonString = '{
"results": [
{
"address_components": [
{
"long_name": "Snip",
"short_name": "Snip",
"types": [
"street_number"
]
},
{
"long_name": "Snip",
"short_name": "Snip",
"types": [
"route"
]
},
{
"long_name": "Desert Ridge",
"short_name": "Desert Ridge",
"types": [
"neighborhood",
"political"
]
},
{
"long_name": "Snip",
"short_name": "Snip",
"types": [
"locality",
"political"
]
},
{
"long_name": "Snip",
"short_name": "Snip",
"types": [
"administrative_area_level_3",
"political"
]
}
]
}
]
}';
// Converting Json String to php jsonArray
$jsonArray = json_decode($jsonString);
// Initially its started with an object so you can't access like an array
//echo '<pre>';
//print_r($jsonArray);
// If you want to use results array check the following code
$results = $jsonArray->results;
echo '<pre>';
print_r($results);
/*
* If you want to access address_components key in first set of
* results then you need to use $resluts[0]->address_components[0]
* because every array have multiple objects, check the jsonArray
* once before accessing it wheather it is an array or object.
*/
print_r($results[0]->address_components[0]);
?>