Forum


Replies: 2   Views: 3941
Replacetemplatevariablebyhtml
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by cinngigi  · 28-10-2013 - 10:54

I am testing but got below error



 DOMDocument::loadXML(): Opening and ending tag mismatch: tc line 1 and p in Entity, line: 1 in C:\wamp\www\classes\CreateDocx.inc on line 4392



Script



require_once('C:\wamp\www\classes\CreateDocx.inc');

$docx = new CreateDocx();

$docx->addTemplate('C:\wamp\www\templates\Form0004test.docx');

$html = '<table border="1">

<tr>

<td>row 1, cell 1</td>

<td>row 1, cell 2</td>

</tr>

<tr>

<td>row 2, cell 1</td>

<td>row 2, cell 2</td>

</tr>

</table>';

$docx->replaceTemplateVariableByHTML('STable', 'block', $html); 

$docx->createDocx("../newpro/docprocessed/Kerala Dec_");



what is happend ?