PHP Classes

Series and tables

Recommend this page to a friend!

      PHP DOCX Template  >  All threads  >  Series and tables  >  (Un) Subscribe thread alerts  
Subject:Series and tables
Summary:Extension request: allow for more versatile replacement
Messages:4
Author:Diego Zuccato
Date:2013-09-17 19:36:02
Update:2013-10-13 07:37:29
 

  1. Series and tables   Reply   Report abuse  
Picture of Diego Zuccato Diego Zuccato - 2013-09-17 19:36:02
It could be useful to be able to have "pseudo structures" like:
{BEGIN:mylist}
* {listitem}
{END:mylist}
and do something like a "foreach()":
$doc->iterate('mylist', 'listitem', array('line 1', 'line 2'));
that results in
* line 1
* line 2

Another (more or less related) extension could be like "print series": the document gets loaded, but fields gets replaced by arrays, resulting in a multi-page document.

Is it doable?

  2. Re: Series and tables   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2013-10-13 07:37:29 - In reply to message 1 from Diego Zuccato
diego, I want iniclude iterators in next release

  3. Re: Series and tables   Reply   Report abuse  
Picture of Ridwan Ridwan - 2017-01-21 20:55:07 - In reply to message 2 from Sergey Shuchkin
have you release??

  4. Re: Series and tables   Reply   Report abuse  
Picture of Marco Pivanti Marco Pivanti - 2018-06-18 10:55:30 - In reply to message 2 from Sergey Shuchkin
Hi, this request would be very useful.

For example I have to put a table in DocX with a indefinite number of rows.

So a document table row with {tags} inside example:
{BEGINLIST:list_table}
____________________________________________________________________
|{col1} |{col2} |{col3} |
{ENDLIST:list_table}


would be great.

in php code I imagine something like:

$docx->beginList('list_table');

$arrValues=array();
$arrValues['col1']='TEST';
$arrValues['col2']='Pippo';
$arrValues['col3']=130.23;

$docx->insertListItem($arrValues);

$arrValues=array();
$arrValues['col1']='TEST2';
$arrValues['col2']='Pluto';
$arrValues['col3']=550;

$docx->insertListItem($arrValues);

$docx->endList('list_table');

What do you think about this?