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 are currently evaluating phpdocx for replacing paper forms and need to embed HTML within tables in a template.
The tutorial which explains how to do this no longer works.
I tried the following code but it does not render anything in the cell marked $html$.
$docx = new CreateDocxFromTemplate('../templates/test.docx');
$wf = new WordFragment($docx);
$html = ''; // My HTML was removed by the forum code.
$htmlFragment = $wf->embedHTML($html);
$data = array(
array('name' => 'Example name', 'number' => 12345, 'html' => $htmlFragment)
);
$docx->replaceTableVariable($data);