title: is it possible to get sub array from mysql query?
body: <p>I have a query that prints record in an array, but I need one more array in the last field e.g</p>
  
  <pre><code>[0] = Array
      [id] =&gt; 1
      [name]=&gt; test
      [age]=&gt; 25
      [subjects]=&gt; 3
      [order_details] = array(
                  [0] =&gt; array(
                 'id' =&gt; 1
                 'company_id'=&gt; 8
                 'purchase_invoice_id '=&gt; 102
                 'model_id' =&gt; 1
                 'date' =&gt; 2015-12-1
                 'IMEI'=&gt;7654367876
                 'color' =&gt; black     
                 'purchase_price' =&gt; 500
                 'is_sold' =&gt; 1
                 'is_returned'=&gt;1
             )
  </code></pre>
  
  <p>can any one guide me ? I need order_details in sub array, but please make sure it shouldn't be from php I need one mysql query to sort it out. </p>
  
  <p>Thanks </p>