title: In Yii2 how to use array index as $key when using ArrayHelper::map() method?
body: <pre><code>$lang = [
     'en' =&gt; ['id'=&gt;'1', 'name' =&gt; 'English', 'short' =&gt; '1', 'active' =&gt; '1',],
     'tn' =&gt; ['id'=&gt;'2', 'name' =&gt; 'Tamil', 'short' =&gt; '2', 'active' =&gt;'1',],
  ]; // sample array`    
  </code></pre>
  
  <p>In yii2 i can use the array map method as follow.
  <code>
  ArrayHelper::map($lang,'id','name');</code></p>
  
  <p>But how to put the array index ('en' and 'tn') in the place 'id' 
  <code>
  ex:ArrayHelper::map($lang, array_index,'name');</code></p>
  
  <p>thanks</p>