title: PHP Removing duplicate objects from array
body: <p>I've tried all sorts of PHP logic and PHP's built in functions to remove duplicate values but it is not working no errors shows up but all my JQuery and CSS doesn't work if use <code>array_unique() in_array()</code> to remove the duplicate objects in my array</p>
  
  <p>this is how i am creating my <code>person_row_array</code> inside a while loop:</p>
  
  <pre><code>$person_row = Person::findByID($pi_claimant_row-&gt;person_id);
  $person_row_array[] = $person_row;
  </code></pre>
  
  <p>object print_r is below:</p>
  
  <pre><code>Array
  (
  [0] =&gt; stdClass Object
      (
          [id] =&gt; 12
          [flat_no] =&gt; 
          [house_no] =&gt; *
          [street] =&gt; 
          [town] =&gt; 
          [postcode] =&gt; *
          [county] =&gt; 
      )
  
  [1] =&gt; stdClass Object
      (
          [id] =&gt; 14
          [flat_no] =&gt; 2
          [house_no] =&gt; 33
          [street] =&gt; Street
          [town] =&gt; Town
          [postcode] =&gt; BB
          [county] =&gt; County
      )
  
  [2] =&gt; stdClass Object
      (
          [id] =&gt; 14
          [flat_no] =&gt; 2
          [house_no] =&gt; 33
          [street] =&gt; Street
          [town] =&gt; Town
          [postcode] =&gt; BB
          [county] =&gt; County
      )
  
  [3] =&gt; stdClass Object
      (
          [id] =&gt; 14
          [flat_no] =&gt; 2
          [house_no] =&gt; 33
          [street] =&gt; Street
          [town] =&gt; Town
          [postcode] =&gt; BB
          [county] =&gt; County
      )
  
  [4] =&gt; stdClass Object
      (
          [id] =&gt; 15
          [flat_no] =&gt; FN
          [house_no] =&gt; HN
          [street] =&gt; Street
          [town] =&gt; Nelson
          [postcode] =&gt; PC
          [county] =&gt; Manchester
      )
  
  [5] =&gt; stdClass Object
      (
          [id] =&gt; 15
          [flat_no] =&gt; FN
          [house_no] =&gt; HN
          [street] =&gt; Street
          [town] =&gt; Nelson
          [postcode] =&gt; PC
          [county] =&gt; Manchester
      )
  
  [6] =&gt; stdClass Object
      (
          [id] =&gt; 16
          [flat_no] =&gt; FN
          [house_no] =&gt; house
          [street] =&gt; Manchester Road
          [town] =&gt; Town
          [postcode] =&gt; M1 4MK
          [county] =&gt; County
      )
  
  )
  </code></pre>
  
  <p>I want to remove those duplicate ones please help and please do not advise me to use array_unique() I've been trying this for last few hours not working but if you could tell me any other way or add object if already not exits.</p>
  
  <p>Please Note this is fake data i only want to remove those array those have similar ids.</p>
  
  <p>Best regards</p>