Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Replace Instagram API:$value->;位置->;latitude输出逗号分隔的值,而Google Maps接受点_Replace_Preg Replace_Str Replace_Json_Instagram - Fatal编程技术网

Replace Instagram API:$value->;位置->;latitude输出逗号分隔的值,而Google Maps接受点

Replace Instagram API:$value->;位置->;latitude输出逗号分隔的值,而Google Maps接受点,replace,preg-replace,str-replace,json,instagram,Replace,Preg Replace,Str Replace,Json,Instagram,$value->location->latitude和$value->location->longitude分别输出4190693866和12414128943。我有一个链接指向 href="http://maps.google.com/maps?q='.htmlentities($value->location->latitude).',+'.htmlentities($value->location->longitude).'" 问题是谷歌地图接受像41.90693

$value->location->latitude
$value->location->longitude
分别输出4190693866和12414128943。我有一个链接指向

href="http://maps.google.com/maps?q='.htmlentities($value->location->latitude).',+'.htmlentities($value->location->longitude).'"

问题是谷歌地图接受像41.90693866这样的值(注意点而不是逗号),它不适用于4190693866、12414128943输入(它适用于41.90693866、12.414128943)。如何使用逗号而不是圆点输出纬度/经度?

我在Instagram API中看到的json数据使用句点,而不是逗号与lat/lng数据。您确定代码中的某些内容没有转换格式吗?检查一下你的代码。

嗯,你说得对。JSON有点。无论如何,我不会转换格式..:o这是我的代码: