Skip to content
Snippets Groups Projects
Commit 9f104649 authored by Brett Bieber's avatar Brett Bieber
Browse files

Fix error undefined constant, add quotes to associative array keys

parent cb12189f
Branches
Tags
No related merge requests found
......@@ -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 . "'})" ;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment