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.
Hi, I encountered a problem when I was trying to generate a table row where in each cell I need a line break in a string.
For example, if I put the codes in the following, the strings 'first line' and 'second line' are still in the same line.
[code]require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$valuesTable = array(
array(
'first line \\r\\n second line', // \\r\\n doesn't work in the generated table !
12
),
array(
21,
22
),
);
$paramsTable = array(
'border' => 'single',
'border_sz' => 20
);
$docx->addTable($valuesTable, $paramsTable);
$docx->createDocx('example_table');[/code]
Is there any way to make them into two lines? Thanks.
Hello,
much greater opportunities of using html with $ docx-> embedHTML
I hope it is useful for you.
Hello,
That's right, we recommend you to used embedHTML.
Regards.