title: How to get id as key and email as its value from multidimensional array?
body: <p>I have multi-dimensional array like below</p>
  
  <pre><code>$records = array(
      array(
          'id' =&gt; 11,
          'first_name' =&gt; 'John',
          'last_name' =&gt; 'Doe',
          'email' =&gt; 'john@gmail.com'
      ),
      array(
          'id' =&gt; 12,
          'first_name' =&gt; 'Sally',
          'last_name' =&gt; 'Smith',
          'email' =&gt; 'sally@gmail.com'
      ),
      array(
          'id' =&gt; 13,
          'first_name' =&gt; 'Jane',
          'last_name' =&gt; 'Jones',
          'email' =&gt; 'jane@gmail.com'
      )
  );
  </code></pre>
  
  <p>Now,I want the output as array in form of id as key and email as its value.</p>
  
  <pre><code>Array
  (
      [11] =&gt; john@gmail.com
      [12] =&gt; sally@gmail.com
      [13] =&gt; jane@gmail.com
  )
  </code></pre>
  
  <p>I want short code for it, Not want any lengthy code. </p>
  
  <p>I have tried it with foreach</p>
  
  <pre><code>$collect_data = array();
  foreach($records as $key=&gt;$data){
    $collect_data[$data['id']] = $data['email']
  }
  </code></pre>
  
  <p>Any one know short code for above to achieve my requirement.</p>