title: php - get numeric index of associative array
body: <p>I have an associative array and I need to find the numeric position of a key.
  I could loop through the array manually to find it, but is there a better way build into PHP?</p>
  
  <pre><code>$a = array(
    'blue'   =&gt; 'nice',
    'car'    =&gt; 'fast',
    'number' =&gt; 'none'
  );
  
  // echo (find numeric index of $a['car']); // output: 1
  </code></pre>