Is there a way to have linebreak when passing in a text variable. I want to write a line, then go to next line and write more.
[/quote]
Hello,
You can do linebreaks using an array; for example:
$text = array(
'David Hume',
'-----------',
'Bye'
);
$docx->addTemplateVariable('NAME', $text);
Please check intermediate/Template_multitext.php example.
Regards.