Replies: 7   Views: 3491
Addelement and addtext
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 xkp  · 11-04-2013 - 12:12

following the example you suggest above i have tried this:

$paramsTable = array(
'border' => 'single',
'border_sz' => 10,
'size_col' => 2000

$paramsLeftTextTable[0] = array(
'text' => 'Left',
'b' => 'single',
'jc' => 'left',
'sz' => 14,

$paramsRightTextTable[0] = array(
'text' => 'Right',
'b' => 'none',
'jc' => 'right',
'i' => 'single',
'sz' => 11,

$table[] = array($docx->addElement('addText', $paramsLeftTextTable),$docx->addElement('addText', $paramsRightTextTable));
$docx->addTable($table, $paramsTable);

everything works fine ('b', 'i', 'sz') EXCEPT the 'jc'.

as both the elements of the table have left alignment on my docx.

Any idea the reason why?
Please advice.

I am using docx 2.5 PRO and word 2007.

Thanks in advance.