Heres what I am trying to do, I have a php script that creates a piece of html (enclosed) that is entered into a database for phplist a mailinglist.

This forms the html message that the list sends out, now within this html message there is a table containing 7 rows of 3 columns and for some reason the final cell (bottom right) is messed up and it in turn messes up everything that comes after it in the code of the rest of the email, so some text doesnt display right and some of the border to the right and bottom doesnt display either.

I tested this using a table with only 3 across and 1 down an 3 by 6 and 3 by 7 and the couple of tests I did with each seemed to work for all the ones that had less than 18 total cells, but as soon as I got to 18 total table cells one test worked and one didnt, then when i tried 21 total cells (3 by 7) that didnt work either in any test, and then when i tried 24 cells it looked exactly like the 21 cell test, so the last row of the table was removed completely for some reason.

Code available to check here code with issues.txt and I checked it in Windows Live Mail on Windows 7 machine for my email program.

I do not see anything obvious in the code causing it and why different number of rows causes different results? when each row is dynamically generated via php using the same code so only difference between each row is the content in the cell, just text and an image.