title: PHP remove sub-array
body: <p>I have a PHP array that is returning dynamic values as follows:</p>
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [user_id] =&gt; 1234
      )
  
  [1] =&gt; Array
      (
          [user_id] =&gt; 9876
      )
  
  )
  </code></pre>
  <p>Problem is that I want to find out what array key user_id 9876 has, but because user_id is a sub array I can't simply do an array flip and then look it up like that. I tried doing an array flip method like below but the array flip doesnt work</p>
  <pre><code>$fliparray = array_flip($original);
  echo $fliparray['7876'];
  </code></pre>