首页 >后端开发 >php教程 > php数据有关问题,

php数据有关问题,

WBOY
WBOY原创
2016-06-13 12:35:41782浏览

php数据问题,请教高手!
有这样一个数组:

Array<br />
(<br />
    [0] => Array<br />
        (<br />
            [time] => 1382060855000<br />
            [day] => 2013-10-18<br />
            [latitude] => 39.9289<br />
            [longitude] => 116.3883<br />
        )<br />
<br />
    [1] => Array<br />
        (<br />
            [time] => 1382060855000<br />
            [day] => 2013-10-18<br />
            [latitude] => 42<br />
            [longitude] => 43.5<br />
        )<br />
<br />
    [2] => Array<br />
        (<br />
            [time] => 1382060855000<br />
            [day] => 2013-10-18<br />
            [latitude] => 38.9122<br />
            [longitude] => 121.6022<br />
        )<br />
<br />
    [3] => Array<br />
        (<br />
            [time] => 1382060855000<br />
            [day] => 2013-10-18<br />
            [latitude] => 40.5525<br />
            [longitude] => -74.2915<br />
        )<br />
<br />
    [4] => Array<br />
        (<br />
            [time] => 1382060855000<br />
            [day] => 2013-10-18<br />
            [latitude] => 40.5525<br />
            [longitude] => -74.2915<br />
        )<br />
<br />
    [5] => Array<br />
        (<br />
            [time] => 1382060855000<br />
            [day] => 2013-10-18<br />
            [latitude] => 38.9122<br />
            [longitude] => 121.6022<br />
        )<br />
<br />
    [6] => Array<br />
        (<br />
            [time] => 1382060855000<br />
            [day] => 2013-10-18<br />
            [latitude] => 38.9122<br />
            [longitude] => 121.6022<br />
        )<br />
)

里面的经纬度有重复的数据,想过滤掉重复数据,并且得到每一个相同经纬度的数量。最后得到的数组如下:


这个要怎么实现呢?

php 数组
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn