title: How to remove duplicate child from array PHP
body: <p>i need help about how to remove one or more array child from set of array that have exactly same keys and values with other child in PHP. Please take a look this array:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [scn_fr_tm] =&gt; 10:35
              [scn_to_tm] =&gt; 12:55
              [mov_prnt_nm] =&gt; Thor Ragnarok
          )
      [1] =&gt; Array
          (
              [scn_fr_tm] =&gt; 10:40
              [scn_to_tm] =&gt; 12:39
              [mov_prnt_nm] =&gt; Geostorm
          )
      [2] =&gt; Array
          (
              [scn_fr_tm] =&gt; 11:30
              [scn_to_tm] =&gt; 13:22
              [mov_prnt_nm] =&gt; One Fine Day
          )
      [3] =&gt; Array
          (
              [scn_fr_tm] =&gt; 11:30
              [scn_to_tm] =&gt; 13:22
              [mov_prnt_nm] =&gt; One Fine Day
          )
      [4] =&gt; Array
          (
              [scn_fr_tm] =&gt; 11:30
              [scn_to_tm] =&gt; 13:00
              [mov_prnt_nm] =&gt; Total Chaos
          )
      [5] =&gt; Array
          (
              [scn_fr_tm] =&gt; 11:30
              [scn_to_tm] =&gt; 13:22
              [mov_prnt_nm] =&gt; One Fine Day
          )
  )
  </code></pre>
  
  <p>as you can see from above array, i want to remove array[3] and array[5] from array because it has duplicate keys and values with array[2]. Above array created dynamically, so please don't ask me to use <code>unset(array[3])</code> and <code>unset(array[5])</code>.</p>
  
  <p>here is my array creation code, the array created from other array:</p>
  
  <pre><code>foreach ($datas as $data)
  {
      if (array_key_exists('attr', $data))
      {
          $arr[] = array(
              'scn_fr_tm'     =&gt; substr_replace($data['attr'][0]['scn_fr_tm'],':',2,0),
              'scn_to_tm'     =&gt; substr_replace($data['attr'][0]['scn_to_tm'],':',2,0),
              'mov_prnt_nm'   =&gt; substr($data['mov_prnt_nm'], 0, 20)
          );
      }
  }
  </code></pre>
  
  <p>Thank you for your help</p>