Forum


Replies: 4   Views: 3136
Using template
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 alberto  · 11-04-2013 - 12:13

i have a code like this:

foreach($elements as $e ) {

if (!is_null($e)) {

$valuesTable = array(
array(
"1",
"2",
),
array(
$e->1(),
$e->2()
),
array(
"3",
"4"
),
array(
$e->3(),
$e->4()
),
array(
"5",
"6"
),
array(
$e->5(),
$e->6()
)
);


$docx->addTemplate('templates/element/high.docx');
$docx->addTemplateVariable('1', $e->1());
$docx->addTemplateVariable('2', $e->2());


$docx->addBreak('page');
$i++;
}
}

Why i have only one table in one page? $elements has more elements.

Alberto