echo "<td width="62">\n";

non puoi mettere doppi apici racchiusi in doppi apici rappresenta una interruzione di stringa.... nell'esempio:

echo "<td width="
62
">\n";

devi mettere il carattere di escape \ oppure le apici singole.

echo "<td width=\"62\">\n";

echo "<td width='62'>\n";