I need some help with this. I have the following array:
$result = array(
0 => array('a'=>1,'b'=>'data1'),
1 => array('a'=>2,'b'=>'data2'),
2 => array('a'=>1,'b'=>'data3'),
);
I want to remove duplicate rows by comparing the values of column 'a'. The expected output should be:
array(
0 => array('a'=>1,'b'=>'data1'),
1 => array('a'=>2,'b'=>'data2'),
);
Or:
array(
1 => array('a'=>2,'b'=>'data2'),
2 => array('a'=>1,'b'=>'data3'),
);
Is there a simple way to do this?