Create and array index and value from the two array elements in a while loop
<pre><code>while($info5 = mysql_fetch_array($result)){
        $namelist[] = $info5["name"];
        $idlist[] = $info5["id"]    
    }
</code></pre>

<p>I want an array which has the entries of the array idlist as it's index and entries of the array namelist as it's values.</p>

<p>Is there a short way to do this?</p>
