I create an SVG file in PHP. I wanted to write a table in the file so I could show it later. I used this, but it does not show the table when I open it with an editing program.
fwrite($hndl, "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n");
fwrite($hndl, "<svg width='297mm' height='210mm' xmlns='http://www.w3.org/2000/svg'>\n");
fwrite($hndl, "<foreignobject x='10' y='10' width='100%' height='150'><body xmlns='http://www.w3.org/1999/xhtml'> ");
fwrite($hndl, "<table><tr><td>".$datelog."</td><td>".$nomcourbe."</td></tr><tr><td>".$login."</td><td>Pilotor</td></tr></table>\n");
fwrite($hndl, "</body></foreignobject>");
fwrite($hndl, "</svg>\n");
fclose($hndl);