title: PHP: How to join two HTML tables into one?
body: <p>I have two HTML tables. Each has three rows and one column only. I'd like to join them programmatically such that I get one table with two columns and three rows. </p>
  
  <p>Is there some function or hack to achieve this? How can I achieve this?</p>
  
  <p><strong>For example</strong> 
  First Table:</p>
  
  <pre><code>&lt;table id="table_one"&gt;
     &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data one&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data two&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data three&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Second Table:</p>
  
  <pre><code>&lt;table id="table_two"&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data one&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data two&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data three&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>This is what I want from the above two tables:</p>
  
  <pre><code>&lt;table id="table_three"&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data one&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
           &lt;label&gt;data one&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data two&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
           &lt;label&gt;data two&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
           &lt;label&gt;data three&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
           &lt;label&gt;data three&lt;/label&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>