Basic html but:
Simply escape out of php mode into standard html then <?PHP echo "$var"; ?> in the relvant cells as needed.
The problem you have is that because your html contains unescaped double quotes, your echo is dropping out early and php then doesn't know what to do with the rest so you get parse errors.
If you insist on echo 'ing all your normal html, just make sure you escape those dbl quotes, or leave 'em out!
echo "<div align=\"center\">\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
etc etc