Turn indexed array to associative array
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3000330/whats-the-most-straightforward-way-in-php-to-create-an-associative-array-from-t">What&#39;s the most straightforward way in PHP to create an associative array from two parallel indexed arrays?</a>  </p>
</blockquote>



<p>How to convert indexed array like:</p>

<pre><code>$a = array("foo", "bar", "hallo", "world");
</code></pre>

<p>to associative array with values from indexed one like:</p>

<pre><code>$a = array(
    "a1" =&gt; "foo",
    "b5" =&gt; "bar",
    "f7" =&gt; "hallo",
    "n4" =&gt; "world"
);
</code></pre>

<p>Maybe some PHP core function?</p>

<p>Or a variant with the same <code>keys</code> like:</p>

<pre><code>$a = array(
    "key" =&gt; "foo",
    "key" =&gt; "bar",
    "key" =&gt; "hallo",
    "key" =&gt; "world"
);
</code></pre>

<p><strong>UPD</strong></p>

<p>I'd like there would be a function like <code>array_merge()</code>, but accept array of keys and array of values to create result array from.</p>
