Replies: 2   Views: 3141
Template issues
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

[quote][b]Quote from wpierson on July 1, 2011, 19:13[/b]
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.


You can do linebreaks using an array; for example:

$text = array(
'David Hume',

$docx->addTemplateVariable('NAME', $text);

Please check intermediate/Template_multitext.php example.