Remove duplicate cells of a column
<p>I want to remove duplicate cells of a column.</p>

<pre><code>&lt;table id="test" border="1"&gt;
    &lt;tr&gt;
    &lt;td&gt;test1&lt;td&gt;
    &lt;td&gt;test2&lt;td&gt;
    &lt;td&gt;test3&lt;td&gt;
    &lt;/tr&gt;
      &lt;tr&gt;
    &lt;td&gt;test4&lt;td&gt;
    &lt;td&gt;test2&lt;td&gt;
    &lt;td&gt;test5&lt;td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;test6&lt;td&gt;
    &lt;td&gt;test2&lt;td&gt;
    &lt;td&gt;test5&lt;td&gt;
    &lt;/tr&gt;
          &lt;tr&gt;
    &lt;td&gt;test6&lt;td&gt;
    &lt;td&gt;test8&lt;td&gt;
    &lt;td&gt;test9&lt;td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;​​​

output
------
test1        test2        test3    
test4        test2        test5    
test6        test2        test9    
test6        test8        test9    


I want in this format
---------------------
test1        test2        test3    
test4                     test5     
test6                     test9    
             test8           
</code></pre>

<p>​</p>
