title: Get index of row with qualifying value from a 2d array
body: <p>I have this array in PHP:</p>
  
  <pre><code>array(
      [0] =&gt; array( 'username' =&gt; 'user1' )
      [1] =&gt; array( 'username' =&gt; 'user2' )
  )
  </code></pre>
  
  <p>If I have the 'username' string how can I get the index value as a number?</p>
  
  <p>Example, if I have 'user1' how can I get 0?</p>