Forum


Replies: 7   Views: 3695
Create a while loop in php to create a table
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  · 16-05-2019 - 08:44

Hello,

Sorry but we don't understand your question:

How can I get a word file (.docx), which contains a table with a list of users extracted from a Mysql database (with a while loop)<br /> I also wanted to know if it is possible to use a template for this.

Do you need to get the data of a table from a DOCX? Or do you need to add a table into a DOCX template?

If you need to get information from a DOCX you can use the following method: getWordContents

If you need to create and insert a table into a DOCX template you need to use a WordFragment:

https://www.phpdocx.com/documentation/practical/wordfragments-and-wordml

https://www.phpdocx.com/api-documentation/templates/replace-variable-word-fragment-Word-document

Regards.