From 9f10464974ef67c88912237142a61f6c869fa18a Mon Sep 17 00:00:00 2001 From: Brett Bieber <brett.bieber@gmail.com> Date: Tue, 25 Aug 2009 15:48:06 +0000 Subject: [PATCH] Fix error undefined constant, add quotes to associative array keys --- unl_theme/scripts/latlon.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/unl_theme/scripts/latlon.php b/unl_theme/scripts/latlon.php index 80d46cf1..7d46e3f0 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 . "'})" ; -- GitLab