title: Create an associative array from another array's values only - PHP
body: <p>I have a simple array where key is <em>always</em> followed by the value:</p>
  
  <pre><code>Array (
      [0] =&gt; x
      [1] =&gt; foo
      [2] =&gt; y
      [3] =&gt; bar
  )
  </code></pre>
  
  <p>which I would like to convert to associative one:</p>
  
  <pre><code>Array (
      [x] =&gt; foo
      [y] =&gt; bar
  )
  </code></pre>
  
  <p>What is the easiest and most elegant way to do this?</p>