How can I add a text break or go to the next line/row while in a text run? I tried to just do $section->addTextBreak(2);
while in the text run but it just added the breaks to the section after the text run. I also tried $textrun->addTextBreak(2);
but it gave me a fatal error. Any responses would be greatly appreciated.
The question was asked 3 years ago but I have the same problem and I found a solution. Maybe this can help new users of PHPWord.
To add a crlf in Word document the tag can help :
$section->addText('Some text <w:br/> another text in the line ');
I found the solution here : http://jeroen.is/phpword-line-breaks/