Try this
$result = [];
foreach ($array as $vlaue) {
$uniqueKey = $vlaue['lat'] .'_'. $vlaue['long'];
$result[$uniqueKey][] = $value;
}
$result = array_values($result);
2
solved Group array by inner value in PHP
Try this
$result = [];
foreach ($array as $vlaue) {
$uniqueKey = $vlaue['lat'] .'_'. $vlaue['long'];
$result[$uniqueKey][] = $value;
}
$result = array_values($result);
2
solved Group array by inner value in PHP