title: How to remove array from array if value have related to other value in array in PHP?
body: <p>I have an array and want to remove the related value form array.</p>
  
  <p>Ex. </p>
  
  <blockquote>
    <p>In array [0] have 1/2/3 and [1] have 1/2/3/4 then [0] is a related to [1] so
    remove [0] which have 1/2/3 from the array.</p>
  </blockquote>
  
  <p>Another Example is</p>
  
  <p>Ex. </p>
  
  <blockquote>
    <p>[2] have 1/2/5, [3] have 1/2/5/6 and [4] have 1/2/5/6/7 then [2] and
    [3] depends on [4] so remove [2] and [3] both array form array.</p>
  </blockquote>
  
  <p>For more details please check below example.</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [id] =&gt; 1/2/3
          )
  
      [1] =&gt; Array
          (
              [id] =&gt; 1/2/3/4
          )
  
      [2] =&gt; Array
          (
              [id] =&gt; 1/2/5
          )
  
      [3] =&gt; Array
          (
              [id] =&gt; 1/2/5/6
          )
  
      [4] =&gt; Array
          (
              [id] =&gt; 1/2/5/6/7
          )
  )
  </code></pre>
  
  <p>Want Output : </p>
  
  <pre><code>Array
  (
  
      [0] =&gt; Array
           (
              [id] =&gt; 1/2/3/4
          )
  
  
      [1] =&gt; Array
          (
              [id] =&gt; 1/2/5/6/7
          )
  )
  </code></pre>
  
  <p>I don't have an idea how can I do that. Is it possible?</p>