Forum


Replies: 7   Views: 3402
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 gerix  · 09-10-2011 - 12:40

Hello, I would like to ask for advice.
How do I create a table that will have the first value in bold and the other normal.
Example: Name: John =>> [b]Name:[/b] John
Source Code:

[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
);

$tabulka1 = array(
array(
"Name:",
"John"
),
array(
"Name:",
"Kate"
),
);

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

$docx->createDocxAndDownload('example_table');

[/code]

Thank you for your answer