title: How to keep only unique values and remove ALL duplicate values based on some flag from an array in PHP?
body: <p>I am working on typical case where I want to sort URLs from multidimensional array based on case insensitive basis and also their is status associated with URL. If user set multiple urls with different status then I want to get the only one url with the status set to false out of duplicate urls. </p>
  
  <p>Original array:                    </p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [url] =&gt; www.abc.com
          [status] =&gt; true
      )
  
  [1] =&gt; Array
      (
          [url] =&gt; www.123.com
          [status] =&gt; true
      )
  
  [2] =&gt; Array
      (
          [url] =&gt; www.abc.com
          [status] =&gt; true
      )
  
  
  [3] =&gt; Array
      (
          [url] =&gt; www.Abc.com
          [status] =&gt; false
      )
  )
  </code></pre>
  
  <p>Final result I want:      </p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [url] =&gt; www.abc.com
          [status] =&gt; false
      )
  
  [1] =&gt; Array
      (
          [url] =&gt; www.123.com
          [status] =&gt; true
       )
  )
  </code></pre>