How to interpret this Form Error

as in the subject… what this error could refer to ?

IT IS REFERRING TO THIS CODE BUT i’M NOT SURE WHAT IS WRONG IN IT:

/**$zipcode = {ZIP};
$geocode = file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$zipcode.'&sensor=false');
$output = json_decode($geocode);

$lat=$output->results[0]->geometry->location->lat;
$long=$output->results[0]->geometry->location->lng;

{Latitude} = $lat;
{Longtitude} = $long;
**/

[ATTACH=JSON]{“alt”:“Click image for larger version Name: 2018-09-12 00_09_44-TECHNICIAN REPUBLIC.jpg Views: 1 Size: 141.2 KB ID: 84706”,“data-align”:“none”,“data-attachmentid”:“84706”,“data-size”:“full”,“title”:“2018-09-12 00_09_44-TECHNICIAN REPUBLIC.jpg”}[/ATTACH]

2018-09-12 00_09_44-TECHNICIAN REPUBLIC.jpg

and with this code:

$zipcode = {ZIP};
$geocode = file_get_contents(‘http://maps.google.com/maps/api/geocode/json?address=’.$zipcode.’&sensor=false’);
$output = json_decode($geocode);

$lat=$output->results[0]->geometry->location->lat;
$long=$output->results[0]->geometry->location->lng;

{Latitude} = $lat;
{Longtitude} = $long;

the problem is

$lat=$output->results[0]->geometry->location->lat;
$long=$output->results[0]->geometry->location->lng;

i think the json_decode function is not returning a valid argument:

try to use a:


if ( isset( $output->results[0] ) )
{
     echo " it works";
}
else
{
    echo "daaaang";
}

Regards