select('places', '*', ['osmid' => $VARS['osmid']])[0]; $geo['name'] = "Places"; $geo['type'] = 'FeatureCollection'; $geo['features'] = []; $geo['features'][] = array("type" => "Feature", "geometry" => [ "type" => "Point", "coordinates" => [ floatval($place['longitude']), floatval($place['latitude']) ] ], "properties" => [ "osm_id" => intval($place['osmid']), "name" => ($place['name'] == '' ? null : $place['name']) ] ); //var_dump($geo); $out = json_encode($geo); if ($out == false) { sendError("Server error."); } else { echo $out; }