title: Is there php built in array function to change value as key
body: <p>Given an array:</p>
  <pre class="lang-php prettyprint-override"><code>$array = ['active', 'pending', 'nonactive'];
  </code></pre>
  <p>expected manipulation result:</p>
  <pre class="lang-php prettyprint-override"><code>$result = [
    'active'=&gt;'active',
    'pending'=&gt;'pending',
    'nonactive'=&gt;'nonactive'
  ];
  </code></pre>
  <p>We know we can do it by itarate over array <code>$array</code>,</p>
  <p>but is there php builtin function to get that result?</p>