Forum


Replies: 1   Views: 3231
Something about creating a 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 clio  · 08-04-2015 - 02:32

Hello, I’m trying to create a list (like the snapshot shown below): https://drive.google.com/open?id=0B1VQFyg1-13uX3BaNUhVM0VVcTg&authuser=0 By using an array and $docx->addList($arr): $arr = array( 'ITEM ONE', array( 'The General Description of Item One', array('Sub description one', 'Sub description two'), 'Continue the General Description of Item One', array('Sub description three', 'Sub description four','Sub description five') ), 'ITEM TWO', array('Candidate one', 'Candidate Two') ); $docx->addList($arr); But I can’t get the expected result. Is there any way to achieve this? Best regards, Henry

Posted by admin  · 08-04-2015 - 07:20

Hello, The method addList can't create a list like that. You'd need to do it with templates, this is to create a document as a base template with that list containing placeholders and remove/replace them, and then merge the documents. Or create and import a custom list style. Regards.