title: PHP- Array with same value with different key - Make on
body: <p>What it would happen if i have same value on different key in php? So I need to remove other keys with value and keep only one.Either array could be single or multidimentional.
  Tak a look at the code please</p>
  
  <hr>
  
  <pre><code>Array
  (
        [success] =&gt; Array
           (
              [0] =&gt; Done.
              [1] =&gt; Done.
           )
  
        [error] =&gt; Array
           (
              [0] =&gt; This request has already been processed.
              [1] =&gt; This request has already been processed.
              [2] =&gt; This request has already been processed.
              [3] =&gt; You Don't Have Permission.
              [4] =&gt; You Don't Have Permission.
           )
  
        [warning] =&gt; Array
           (
           )
  
  )
  </code></pre>
  
  <p>As you can see on <code>[error]</code> and <code>[success]</code> array there is 2/3 same value on different key.
  Now What can i do? to keep only one.
  Like the below one</p>
  
  <hr>
  
  <pre><code>Array
  (
        [success] =&gt; Array
           (
              [0] =&gt; Done.
           )
  
        [error] =&gt; Array
           (
              [0] =&gt; This request has already been processed.
              [1] =&gt; You Don't Have Permission.
           )
  
        [warning] =&gt; Array
           (
           )
  
  )
  </code></pre>