title: Replace first level array keys using values from a specific column
body: <p>I have an array like this</p>
  <pre><code>$users = array(
      [0] =&gt; array('Id' =&gt; 3, 'Name' =&gt; 'Bob'),
      [1] =&gt; array('Id' =&gt; 8, 'Name' =&gt; 'Alice'),
  )
  </code></pre>
  <p>and I want to pull the Ids 'up' one level so that the final array is:</p>
  <pre><code>$usersById = array(
      [3] =&gt; array('Id' =&gt; 3, 'Name' =&gt; 'Bob'),
      [8] =&gt; array('Id' =&gt; 8, 'Name' =&gt; 'Alice'),
  )
  </code></pre>
  <p>The Id values are unique.</p>
  <p>Is there a native PHP way to do this? The code I'm currently using is:</p>
  <pre><code>$usersById = array();
  foreach ($users as $key =&gt; $value)
  {
      $usersById[$value['Id']] = $value;
  }
  </code></pre>
  <p>This works, but is not terribly elegant.</p>