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.
If I have it right, you can use replaceTemplateVariableByHTML, converting line feed to < /br>,
[code]
$text='first line
second line';
$text=str_replace("\n",'\n',$text);
$text=str_replace('\n','<br />',$text);
$parHTML=array('isFile' => false, 'parseDivsAsPs' => true,'downloadImages' => false);
$docx->replaceTemplateVariableByHTML('templateVariable','inline',$text,$parHTML);
[/code]
Regards,