array(
0 =>array('attr_id' => '1','attr_name' => '颜色',),
1 =>array('attr_id' => '3','attr_name' => '重量',),
2 =>array('attr_id' => '4','attr_name' => '速度',),
3 =>array('attr_id' => '1','attr_name' => '颜色',),
4 =>array('attr_id' => '3','attr_name' => '重量',),
5 =>array('attr_id' => '4','attr_name' => '速度',),
6 =>array('attr_id' => '5','attr_name' => '力量',),
7 =>array('attr_id' => '6','attr_name' => '型号',),
);
数组中重复的 attr_name 为 (颜色、重量、速度) 我要删除数组中的这些值,只留下 attr_name 为 (力量、型号) 的
如下效果
$arr = array(
0 =>array('attr_id' => '5','attr_name' => '力量',),
1 =>array('attr_id' => '6','attr_name' => '型号',),
);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…