Possible Duplicate:
How to access an object property with a minus-sign?
I am trying to parse geo:point / geo:lat but getting nowhere fast. Here's the code I have so far
$content = get_data('http://ws.audioscrobbler.com/2.0/?method=geo.getevents&location=united+kingdom&api_key=XXX&format=json&limit=10000&festivalsonly=1');
$LFMdata = json_decode($content);
foreach ($LFMdata->events->event as $event) {
$venue_lat = $event->venue->location["geo:point"]["geo:lat"];
$venue_long = $event->venue->location["geo:point"]["geo:long"];
The JSON will contain something like
"geo:point": {
"geo:lat": "52.7352",
"geo:long": "-1.695392"
}
Anyone got any idea? Seen examples in JavaScript but not PHP