Forum


Replies: 1   Views: 2597
Table in list
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 Brck  · 16-07-2018 - 08:02

Hi, 

I am trying to insert a table in a list, for example:

(1) some text

(2) ---TABLE---

I do this approximately as follows:

$list[] = "some text"

$table= new wordFragment($docx);
$table->addTable($tableContent, $tableOptions);
$list[] = $table;

$docx->addList($list);

However, in the resulting document, the table is not shown but instead all the table contents are just printed as one inline row.

Can this be done/fixed?

Best regards,

Posted by admin  · 17-07-2018 - 14:37

Hello,

You can add a WordFragment as list item, but only inline contents in an array of contents. We recommend you to add the WordFragment standalone as list item or add a placeholder and then replace it by the table WordFragment.

Regards.