title: PDO: group a property instead of duplicate lines
body: <p>Good morning,</p>
  
  <p>I have a request that return me several information for a reservation and each reservation can be linked to several room.</p>
  
  <p>Is it possible to have an array of room instead of duplicate the line each time they are multiple rooms for a reservation.</p>
  
  <p>What I want: </p>
  
  <pre><code>[
      idReservation1 =&gt; [
          "client_name" =&gt; "kévin titi",
          "checkin" =&gt; "2017-08-08",
          "d_checkout" =&gt; "2017-08-10",
          "email" =&gt; "titi@gmail.com",
          room_id =&gt; [1,2,3,9]//here I want an array
      ],
      idReservation2 =&gt; [
          "client_name" =&gt; "firstname lastname",
          "checkin" =&gt; "2017-08-18",
          "d_checkout" =&gt; "2017-08-20",
          "email" =&gt; "toto@gmail.com",
          "room_id" =&gt; [1,12,13,9]//here I want an array
      ]
  ]
  </code></pre>
  
  <p>if the idReservation is not the key does not matter, the important here is to have an array for room_id
  I have looked all PDO fetch modes but they don't seems to match to my problem.</p>
  
  <p>My request:  </p>
  
  <pre><code> $prep = $this-&gt;pdo-&gt;prepare("
              SELECT re.id as resId, re.client_name, re.d_checkin, re.d_checkout, re.mail, ro_re.room_id as room
              FROM Reservation re
              JOIN Room_Reservation ro_re ON ro_re.reservation_id = re.id
              WHERE re.confirmed = false
          ");
  </code></pre>
  
  <p>Thanks</p>