Replies: 7   Views: 5149
[docx v2.6] replacetemplatevariablebyhtml issue
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 admin  · 11-04-2013 - 12:13


For each document you need to create a new CreateDocx object:

[code]private function createdocx($value) {
$docx = new CreateDocx();
if($this->style == 1) {
$docx->replaceTemplateVariableByHTML('ADDRESS', 'inline', $value, array('isFile' => false, 'parseDivsAsPs' => true, 'downloadImages' => false));
} else {
$docx->addTemplateVariable('ADDRESS', $value);
return $docx;