Forum


Replies: 5   Views: 3211
Define width for table colums
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 nachtschicht  · 22-11-2011 - 19:46

Hi,

is there a way to define the width for a table column and second question would it be possible to give the L1 rows a different background color than the L2 rows?


[code]
require_once 'classes/CreateDocx.inc';

$docx = new CreateDocx();

$valuesTable = array(
array(
'L1',
'L1'
),
array(
'L2',
'L2'
),
);

$paramsTable = array(
'border' => 'single',
'border_sz' => 20
);

$docx->addTable($valuesTable, $paramsTable);

$docx->createDocx('example_table');
[/code]

Thanks for your help