title: Dynamic rowspan table in PHP
body: <p>I have a problem getting a table to work.
  I want to adjust a printable form for order list (opencart),
  but I want address box on left and products ordered on right.
  The problem is the number of products varies per order, so using rowspan on the address box does not work (I left the rowspan in the code).</p>
  
  <pre><code>      &lt;thead&gt;
          &lt;tr&gt;
            &lt;td&gt;&lt;b&gt;&lt;?php echo $text_to; ?&gt;&lt;/b&gt;&lt;/td&gt;
             &lt;td&gt;&lt;b&gt;&lt;?php echo $column_product; ?&gt;&lt;/b&gt;&lt;/td&gt;
            &lt;td class="text-center"&gt;&lt;b&gt;&lt;?php echo $column_quantity; ?&gt;&lt;/b&gt;&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;&lt;tr&gt;
            &lt;td rowspan="10"&gt;&lt;?php echo $order['shipping_address']; ?&gt;&lt;br/&gt;&lt;br/&gt;
              &lt;?php echo $order['telephone']; ?&gt;
              &lt;br /&gt;
              &lt;?php if ($order['shipping_method']) { ?&gt;
              &lt;b&gt;&lt;?php echo $text_shipping_method; ?&gt;&lt;/b&gt; &lt;?php echo $order['shipping_method']; ?&gt;&lt;br /&gt;
              &lt;?php } ?&gt;&lt;/td&gt;&lt;/tr&gt;
          &lt;?php foreach ($order['product'] as $product) { ?&gt;
            &lt;td&gt;&lt;?php echo $product['name']; ?&gt;
              &lt;?php foreach ($product['option'] as $option) { ?&gt;
              &lt;br /&gt;
              &amp;nbsp;&lt;small&gt; - &lt;?php echo $option['name']; ?&gt;: &lt;?php echo $option['value']; ?&gt;&lt;/small&gt;
              &lt;?php } ?&gt;&lt;/td&gt;
            &lt;td class="text-center"&gt;&lt;?php echo $product['quantity']; ?&gt;&lt;/td&gt;
  &lt;/tr&gt;
          &lt;?php } ?&gt;
        &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>