diff --git a/unl_theme/scripts/latlon.php b/unl_theme/scripts/latlon.php index 80d46cf1c34826f6c0456e6fecadde6f70808967..7d46e3f0e786cf05793e80e992082e65c91569db 100644 --- a/unl_theme/scripts/latlon.php +++ b/unl_theme/scripts/latlon.php @@ -19,9 +19,9 @@ $req = 'http://api.local.yahoo.com/MapsService/V1/geocode?appid=2vqgPxLV34EEubUh $phpserialized = file_get_contents($req); $phparray = unserialize($phpserialized); -$resultset = $phparray[ResultSet]; -$result = $resultset[Result]; -$Latitude = $result[Latitude]; -$Longitude = $result[Longitude]; +$resultset = $phparray['ResultSet']; +$result = $resultset['Result']; +$Latitude = $result['Latitude']; +$Longitude = $result['Longitude']; -echo "({'latitude': '" . $Latitude . "', 'longitude': '" . $Longitude . "'})" ; \ No newline at end of file +echo "({'latitude': '" . $Latitude . "', 'longitude': '" . $Longitude . "'})" ;