例子: -
$arrayName = array(
'0' => array('name' => 'a', 'id' => '123' ),
'1' => array('name' => 'b', 'id' => '123' ),
'3' => array('name' => 'c', 'id' => '456' )
);
应在此处分组相同的 Id 值
结果:
$arrayName = array(
'0' => array(
'0' => array('name' => 'a', 'id' => '123' ),
'1' => array('name' => 'b', 'id' => '123' ) ),
'1' => array('1' => array('name' => 'c', 'id' => '456' ) );