PHPDOCX PRO works fine on my webserver. But I can't use both addElement and addTable at the same time.
Can you tell me what is wrong ? Here's my code.
[code]require_once '../3rd-party/phpdocx/classes/CreateDocx.inc';
// instantiation
$docx = new CreateDocx();
$docx->setDefaultFont('Arial');
$docx->setEncodeUTF8();
$paramsText = array(
'text' => 'Epreuve de votre notice biographique',
);
$a1 = $docx->addElement('addText', $paramsText);
$a2 = '';
$paramsText = array(
'text' => 'TEXTE (insertion GRATUITE) PHOTO ou LOGO (voir tarif).',
);
$b1 = $docx->addElement('addText', $paramsText);
$paramsText = array(
'text' => 'Réservation',
);
$b2 = $docx->addElement('addText', $paramsText);
$valuesTable = array(
array(
$a1,
$a2,
),
array(
$b1,
$b2,
),
);
$paramsTable = array(
'TBLLOOKval' => 'ffff01E0',
'TBLSTYLEval' => 'Tablanormal',
'TBLWtype' => 'center',
'TBLWw' => '50',
'border' => 'single',
'border_sz' => 1,
'border_spacing' => 0,
'border_color' => 'CCCCCC',
'jc' => 'left',
'size_col' => 3600
);
$docx->addTable($valuesTable, $paramsTable);
$fileName = 'bat_simple';
$docx->createDocx($fileName);
[/code]