title: Get values of same key from multiple array in php
body: <p>I'm trying to separate the "TID" in an array from these multiple arrays but I couldn't find the efficient solution. </p>
  
  <p>I've the following type of arrays in one variable: </p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [tid] =&gt; 168
          )
  
  )
  Array
  (
      [0] =&gt; Array
          (
              [target_id] =&gt; 14
          )
  
      [1] =&gt; Array
          (
              [target_id] =&gt; 15
          )
  
      [2] =&gt; Array
          (
              [target_id] =&gt; 37
          )
  
  )
  Array
  (
  )
  Array
  (
      [0] =&gt; Array
          (
              [target_id] =&gt; 36
          )
  
  )
  Array
  (
      [0] =&gt; Array
          (
              [target_id] =&gt; 14
          )
  
      [1] =&gt; Array
          (
              [target_id] =&gt; 15
          )
  
  )
  Array
  (
      [0] =&gt; Array
          (
              [target_id] =&gt; 36
          )
  
  )
  Array
  (
      [0] =&gt; Array
          (
              [tid] =&gt; 168
          )
  
      [1] =&gt; Array
          (
              [tid] =&gt; 167
          )
  
  )
  </code></pre>
  
  <p>These values are in one variable and there can be unlimited arrays. </p>
  
  <p>And Expected Output:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [tid] =&gt; 168
          )
      [1] =&gt; Array
          (
              [tid] =&gt; 168
          )
  
      [2] =&gt; Array
          (
              [tid] =&gt; 167
          )
  
  )
  </code></pre>