Код:
<?php
$json = <<<EOF
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-67.593742,
10.24462
]
},
"properties": {
"id": "669163449",
"accuracyInMeters": 0,
"timeStamp": 1301841780,
"reverseGeocode": "Maracay, Venezuela",
"photoUrl": "https://www.google.com/latitude/apps/badge/api?type=photo&photo=Df7VGy8BAAA.9of56owsf4wI6F4odEQ",
"photoWidth": 96,
"photoHeight": 96,
"placardUrl": "https://g=true&stale=false&lod=4&format=png",
"placardWidth": 56,
"placardHeight": 59
}
}
]
}
EOF;
$ar = json_decode($json, true);
print_r($ar);
?>
Вывод:
Array
(
[type] => FeatureCollection
[features] => Array
(
[0] => Array
(
[type] => Feature
[geometry] => Array
(
[type] => Point
[coordinates] => Array
(
[0] => -67.593742
[1] => 10.24462
)
)
[properties] => Array
(
[id] => 669163449
[accuracyInMeters] => 0
[timeStamp] => 1301841780
[reverseGeocode] => Maracay, Venezuela
[photoUrl] => https://www.google.com/latitude/apps/badge/api?type=photo&photo=Df7VGy8BAAA.9of56owsf4wI6F4odEQ
[photoWidth] => 96
[photoHeight] => 96
[placardUrl] => https://g=true&stale=false&lod=4&format=png
[placardWidth] => 56
[placardHeight] => 59
)
)
)
)
Теперь вы можете перемещаться по массиву по своему усмотрению.
Примечание: я переформатировал ваш JSON, так что он на самом делеразборчиво, используя JSONLint .И вы должны прочитать это .