0
I create a SVG file in PHP. I wanted to write a table in the file, and then show it. I used this, but it doesn’t show the table when I open 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);