array('lat'=>$lat + $dlat,'lng'=>$lng-$dlng), 'right-top'=>array('lat'=>$lat + $dlat, 'lng'=>$lng + $dlng), 'left-bottom'=>array('lat'=>$lat - $dlat, 'lng'=>$lng - $dlng), 'right-bottom'=>array('lat'=>$lat - $dlat, 'lng'=>$lng + $dlng) );print_r($squares['left-top']['lat']);//从数库查询匹配的记录$info_sql = select * from `a` where lat0 and lat>{$squares['right-bottom']['lat']} and lat{$squares['left-top']['lng']} and lng 40.770623, 'long' => -73.964367);$point2 = array('lat' => 40.758224, 'long' => -73.917404);$distance = getdistancebetweenpointsnew($point1['lat'], $point1['long'], $point2['lat'], $point2['long']);foreach ($distance as $unit => $value) { echo $unit.': '.number_format($value,4).'
';}?>
更多关于php相关内容感兴趣的读者可查看本站专题:《php数学运算技巧总结》、《php数组(array)操作技巧大全》、《php正则表达式用法总结》、《php+ajax技巧与应用小结》、《php运算与运算符用法总结》、《php网络编程技巧总结》、《php基本语法入门教程》、《php日期与时间用法总结》、《php面向对象程序设计入门教程》、《php字符串(string)用法总结》、《php+mysql数据库操作入门教程》及《php常见数据库操作技巧汇总》
希望本文所述对大家php程序设计有所帮助。
