title: How to dynamicly get a multi dimensional array?
body: <p>My code just populates the last array in the array $workshops</p>
  
  <p>my loop function populates array $workshops, like so</p>
  
  <pre><code>    while (ECSE_purchase::have_products()) {
                  ECSE_purchase::the_product();
                  $prodid = ECSE_purchase_product::get_the_ID();
                  $workshop_data = ETICKETDATA::get_workshop_details_helper($prodid);
                  $workshops = array();  
   if($prodid == 565) {
  ............
  } else { 
  $workshopsTmp = array();
                              $workshopsTmp['workshop_barcode'] = $data['workshop_barcode'];
                              $workshopsTmp['workshop_id'] = ECSE_purchase_product::get_the_ID();
                              $workshopsTmp['workshop_title'] = ECSE_purchase_product::get_the_name();
                              $workshopsTmp['workshop_time'] = $workshop_data['time'];
                              $workshopsTmp['workshop_room'] = $workshop_data['room'];
                              $workshopsTmp['workshop_num_of_tickets'] = ECSE_purchase_product::get_the_QTY();
                              $workshops[] = $workshopsTmp;
  }
  </code></pre>
  
  <p>But here i just get the last array and not like this:</p>
  
  <pre><code>$workshops = array(array('workshop_barcode' =&gt; '0101010101',
                                  'workshop_id' =&gt; '589',
                                  'workshop_title' =&gt; 'Swimming',
                                  'workshop_time' =&gt; '12:00',
                                  'workshop_room' =&gt; 'Room 1',
                                  'workshop_num_of_tickets' =&gt; '2'),
                              array('workshop_barcode' =&gt; '03030303003',
                                  'workshop_id' =&gt; '568',
                                  'workshop_title' =&gt; 'Running',
                                  'workshop_time' =&gt; '15:00',
                                  'workshop_room' =&gt; 'Room 3',
                                  'workshop_num_of_tickets' =&gt; '3'),
                              array('workshop_barcode' =&gt; '0505050505',
                                  'workshop_id' =&gt; '570',
                                  'workshop_title' =&gt; 'Biking',
                                  'workshop_time' =&gt; '16:00',
                                  'workshop_room' =&gt; 'Room 2',
                                  'workshop_num_of_tickets' =&gt; '2'));
  </code></pre>
  
  <p>Any pointers appreciated.</p>
  
  <p>regards,</p>
  
  <p>just edit the loop</p>