时间:2021-07-01 10:21:17 帮助过:37人阅读
$arr = array( Array('101-1148713','-68500','高岩'), Array('101-1148713','-1464.6','高岩'), Array('101-1148712','11','高岩'), Array('101-1148713','98500','高岩'), Array('101-1177035','-11068.4','全玮'));foreach($arr as $v) { $res[$v[2]][$v[0]][] = $v[1];}print_r($res);
Array( [高岩] => Array ( [101-1148713] => Array ( [0] => -68500 [1] => -1464.6 [2] => 98500 ) [101-1148712] => Array ( [0] => 11 ) ) [全玮] => Array ( [101-1177035] => Array ( [0] => -11068.4 ) ))
谢谢斑竹