How can I convert record set from database to array?
<p>How can I convert record set from database to array?
It has 1 table named: <code>tblproduct</code>, with the following schema:</p>

<pre><code> product_id | product_name | product_desc | product_price | product_img
</code></pre>

<p>When I select data from the database I would like an array in the following format:</p>

<pre><code>$product_array = array(
  "105" =&gt; array('product_id' =&gt; '105', 'product_name' =&gt; 'Blackberry 8900',
                 'product_desc' =&gt; '', 'product_price' =&gt; '1150.00',
                 'product_img' =&gt; 'products/product5.jpg'),
  "106" =&gt; array('product_id' =&gt; '106', 'product_name' =&gt; 'Headphone with mic',
                 'product_desc' =&gt; '', 'product_price'=&gt;'148.85', 
                 'product_img' =&gt; 'products/product8.jpg')
);
</code></pre>

<p>Best regards</p>
