title: Select only unique array values from this array
body: <p>I have the following variable $rows:</p>
  
  <blockquote>
    <p>Array (</p>
  
  <pre><code>[0] =&gt; stdClass Object
      (
          [product_sku] =&gt; PCH20
      )
  
  [1] =&gt; stdClass Object
      (
          [product_sku] =&gt; PCH20
      )
  
  [2] =&gt; stdClass Object
      (
          [product_sku] =&gt; PCH19
      )
  
  [3] =&gt; stdClass Object
      (
          [product_sku] =&gt; PCH19
      )
  </code></pre>
    
    <p>)</p>
  </blockquote>
  
  <p>I need to create second array $second containing only unique values:</p>
  
  <blockquote>
    <p>Array (</p>
  
  <pre><code>[0] =&gt; stdClass Object
      (
          [product_sku] =&gt; PCH20
      )
  
  [1] =&gt; stdClass Object
      (
          [product_sku] =&gt; PCH19
      )
  </code></pre>
    
    <p>)</p>
  </blockquote>
  
  <p>But when i run array_unique on $rows, i receive:</p>
  
  <blockquote>
    <p><b>Catchable fatal error</b>:  Object of class stdClass could not be
    converted to string on line <b>191</b><br /></p>
  </blockquote>