$arr = array( array('id' => 122, 'name' => '张三', 'amount' => '1'), array('id' => 123, 'name' => '李四', 'amount' => '1'), array('id' => 124, 'name' => '王五', 'amount' => '1'), array('id' => 125, 'name' => '赵六', 'amount' => '1'), array('id' => 126, 'name' => '赵六', 'amount' => '2'), array('id' => 126, 'name' => '赵六', 'amount' => '2') ); $new = array(); foreach($arr as $row){ if(isset($new[$row['name']])){ $new[$row['name']]['amount'] += $row['amount']; }else{ $new[$row['name']] = $row; } } var_dump($new);