$datas = array(
array(
"id" => "212",
"advert_title" => "测试文章篇数",
"advert_address" => "第一次"
),
array(
"id" => "212",
"advert_title" => "测试文章篇数",
"advert_address" => "第二次"
),
array(
"id" => "176",
"advert_title" => "测试版本取值是否正常",
"advert_address" => "第五次"
),
array(
"id" => "176",
"advert_title" => "测试版本取值是否正常",
"advert_address" => "第六次"
)
);
$result = array();
foreach ($datas as $k => $v) {
$result[$v["id"]][] = $v;
}
echo '';
print_r($result);如上, 结果如下, 基本上是按ID组数组的, 有问题追问.