How Create array with uniq key using php
<p>How Create Array like this.</p>

<pre><code>array(34) { 
    [0]=&gt; object(stdClass)#11 (2) 
        { ["id"]=&gt; string(2) "11" ["name"]=&gt; string(4) "AAAAA" } 
    [1]=&gt; object(stdClass)#12 (2) 
        { ["id"]=&gt; string(2) "12" ["name"]=&gt; string(14) "BBBBB" }
}
</code></pre>

<p>the array I get from database and i use for select option, but i wont create manualy in code how make the array like that.</p>

<p>this my code.</p>

<pre><code>$OPT_name = array('id'=&gt;'0','name'=&gt;'-Pilih-','id'=&gt;'AAAAA','name'=&gt;'BBBBB')";
var_dump($OPT_name);
exit;
</code></pre>

<p>but can't like example in a above.</p>