title: Remove duplicate in array based on column value
body: <p>I need some help with this. I have the following array:</p>
  
  <pre><code>$result = array(
      0 =&gt; array('a'=&gt;1,'b'=&gt;'data1'),
      1 =&gt; array('a'=&gt;2,'b'=&gt;'data2'),
      2 =&gt; array('a'=&gt;1,'b'=&gt;'data3'),
  );
  </code></pre>
  
  <p>I want to remove duplicate rows by comparing the values of column 'a'. The expected output should be:</p>
  
  <pre><code>array(
      0 =&gt; array('a'=&gt;1,'b'=&gt;'data1'),
      1 =&gt; array('a'=&gt;2,'b'=&gt;'data2'),
  );
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>array(
      1 =&gt; array('a'=&gt;2,'b'=&gt;'data2'),
      2 =&gt; array('a'=&gt;1,'b'=&gt;'data3'),
  );
  </code></pre>
  
  <p>Is there a simple way to do this?</p>