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