[code] $docx->addTemplateVariable(
array (
array (
'VAR1' => 'row1 col1',
'VAR2' => 'row1 col2',
'VAR3' => 'row1 col3'
),
array (
'VAR1' => 'row2 col1',
'VAR2' => 'row2 col2',
'VAR3' => 'row2 col3'
)
),
'table'
);[/code]
However, since the table has a header, what happens is that the header is repeated over and over again.
Also, if I have less than three elements added, the template variables show up like this:
[code]
[b]
Header1 Header2 Header 3
Header1 Header2 Header 3
[/b]
row1 col1 row1 col2 row1 col3
row2 col1 row2 col2 row2 col3
$VAR1$ $VAR2$ $VAR3$
[/code]
Everything else (ordinary template variables etc) seem to be working perfectly.
Does anyone have a working example of this, and could tell me which PHP version etc. they are using? I'm using "PHP 5.2.4-2ubuntu5.14 with Suhosin-Patch 0.9.6.2"
Best regards,
Kristian Barek