Forum


Replies: 1   Views: 2623
Problem for insert html table using replacevariablebyhtml
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  · 22-07-2018 - 11:22

Hello,

The problem is that you are using an inline type replacement. You need to use a block type replacement:

$docx->replaceVariableByHTML('lignes', 'block', $html, array('isFile' => false, 'parseDivsAsPs' => true, 'downloadImages' => false));

To keep block tags such as table.

Regards.