title: MySQL JOIN wrapping into an array
body: <p>I have some minor problem with an SQL query. I have to select data from multiple tables like:</p>
  
  <p><strong>offers</strong>:</p>
  
  <pre><code>| id | offer      | info  
  | 1  | City break | information
  </code></pre>
  
  <p><strong>pictures</strong>:  </p>
  
  <pre><code>| id | id_offer | picture_name  | title  
  | 1  | 1        | bucharest.jpg | Bucharest  
  | 2  | 1        | london.jpg    | London
  </code></pre>
  
  <p><strong>sql query</strong>:</p>
  
  <pre><code>SELECT offers.* as t1, pictures.* as t2
  FROM offers  
  JOIN t2 ON t1.id=t2.id_offer  
  WHERE t1.id = '1'
  </code></pre>
  
  <p>The code is much larger but I don't understand how to wrap results from t2 into an array. Because the length of the array returned is made by t2 which is the pictures table. This will return an array with 2 objects.  </p>
  
  <p>It is possible to return one object in the array with both pictures in it?</p>