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.
I'd like to include breaks in my word file, so I use following code:
$docx = new \CreateDocxFromTemplate("replacePlaceholderImages1.docx");
$docx->replaceVariableByText(array("FOO" => "some & text \n foo"), array("target" => "header", "parseLineBreaks" => true));
$docx->createDocx('/tmp/example_replacePlaceholderImages_1');
But I get an exception:
ContextErrorException: Warning: DOMDocument::createElementNS(): unterminated entity reference text in [...]/phpdocx/classes/CreateDocxFromTemplate.inc line 1297
Exception seems due to the presence of '&' symbol