title: Display with smarty in same div products with same value
body: <p>I have 4 products, and 2 of them with the same <code>order_id</code>.</p>
  
  <p>Here is my smarty output <code>$orders</code>: </p>
  
  <pre><code>Array (8) 
  0 =&gt; Array (11) 
    id =&gt; "85" 
    order_id =&gt; "1" 
    user_email =&gt; "jeff@gmail.com" 
    total_price =&gt; "2000" 
    status =&gt; "Pending payment" 
    order_option_id =&gt; "1" 
    image =&gt; "Luxury-Sofa-for-Main-Room-at-Home-Design-Luxury-with-Stunning-Outdoor.jpg" 
    title =&gt; "ruyrytur" 
    variants =&gt; "" 
    quantity =&gt; "1" 
    unit_price =&gt; "123.00" 
  1 =&gt; Array (11) 
    id =&gt; "98" 
    order_id =&gt; "2" 
    user_email =&gt; "jeff@gmail.com" 
    total_price =&gt; "20000" 
    status =&gt; "Pending payment" 
    order_option_id =&gt; "2" 
    image =&gt; "Modern-Green-Home-Architecture-house-plans.jpg" 
    title =&gt; "Vewlix 1080p (black and white)" 
    variants =&gt; "Panel 2 players (+50 euros) Red backlight (+100 euros) Screen 1440p (+400 eur..." 
    quantity =&gt; "3" 
    unit_price =&gt; "2680.00" 
  2 =&gt; Array (11) 
    id =&gt; "99" 
    order_id =&gt; "2" 
    user_email =&gt; "jeff@gmail.com" 
    total_price =&gt; "20000" 
    status =&gt; "Pending payment" 
    order_option_id =&gt; "2" 
    image =&gt; "amazing-modern-villa-Freshome-02.jpg" 
    title =&gt; "Vewlix 1080p (red and white)" 
    variants =&gt; "Panel 2 players (+50 euros)" 
    quantity =&gt; "1" 
    unit_price =&gt; "2000.00" 
  3 =&gt; Array (11) 
    id =&gt; "102" 
    order_id =&gt; "4" 
    user_email =&gt; "jeff@gmail.com" 
    total_price =&gt; "2000" 
    status =&gt; "1" 
    order_option_id =&gt; "4" 
    image =&gt; "amazing-modern-villa-Freshome-02.jpg" 
    title =&gt; "Vewlix 1080p (red and white)" 
    variants =&gt; "Panel 2 players (+50 euros)" 
    quantity =&gt; "1" 
    unit_price =&gt; "2000.00"
  </code></pre>
  
  <p>I tried many foreach to "merge" the products with the same order_id in the same div without success </p>
  
  <p>This is the output I'd like: </p>
  
  <pre><code>&lt;div&gt; 
    id 85 
  &lt;/div&gt; 
  &lt;div&gt; 
    id 98 
    id 99 
  &lt;/div&gt; 
  &lt;div&gt; 
    id 102 
  &lt;/div&gt;
  </code></pre>
  
  <p>My foreach (that simply loop into results)</p>
  
  <pre><code>            {foreach $orders as $orderdisplay}
  
                      &lt;table class="table" style="border: 1px solid black;"&gt;
                          &lt;tbody&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;&lt;/td&gt;
                                  &lt;td&gt;ITEM&lt;/td&gt;
                                  &lt;td&gt;QUANTITY&lt;/td&gt;
                                  &lt;td&gt;PRICE&lt;/td&gt;
                                  &lt;td&gt;STATUS&lt;/td&gt;
                              &lt;/tr&gt; 
                              &lt;tr&gt;
                                  &lt;td&gt;
                                  &lt;/td&gt;
                                  &lt;td&gt;{$orderdisplay.title}&lt;br /&gt;{$orderdisplay.variants}&lt;/td&gt;
                                  &lt;td&gt;{$orderdisplay.quantity}&lt;/td&gt;
                                  &lt;td&gt;{$orderdisplay.total_price}&lt;/td&gt;
                                  &lt;td&gt;{$orderdisplay.status}&lt;/td&gt;
                              &lt;/tr&gt;
  
                          &lt;/tbody&gt;
                      &lt;/table&gt;
                      &lt;span&gt;{$orderdisplay.total_price}&lt;/span&gt;
              {/foreach}
  </code></pre>