Forum


Replies: 7   Views: 3554
Format table
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 ankit2rai  · 11-04-2013 - 12:13

I hope the below example will serve your purpose well…

[code]
<?php
require_once ‘../../classes/CreateDocx.inc’;
$docx = new CreateDocx();

$paramsTable = array(
‘border’ => ‘none’,
‘border_spacing’ => 5,
’size_col’ => ‘3000′,
‘TBLWw’ => ‘500′,
‘font’ => Arial,
‘border_sz’ => 10
);

$text[] =
array(
‘text’ => ‘Name : ‘,
‘b’ => ’single’,
);

$var=$docx->addElement(’addText’,$text);

$tabulka1 = array(
array(
$var,
“John”
),
array(
$var,
“Kate”
),
);

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

$docx->createDocxAndDownload(’example_table’);
[/code]