Forum


Replies: 13   Views: 3833
Adding multi-line text
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 bstang  · 16-10-2013 - 06:40

Hi,

I am trying to add multi-line text to my table row 2 cell 2.



--------------------------------------------------------------------------

$tableSettings = array(

    'header' => true


);



$data = array(

    array( //row 1

       "cell_1_1"=>"foo",

       "cell_1_2"=>"bar"

    ),

    array( //row 2


       "cell_2_1"=>"hello",

       "cell_2_2"=>array(

                             'David Hume',

                             '--------------',

                             'bye'

                         )

    )

)

$docx->addTemplateVariable($data,'table',$tableSettings);

--------------------------------------------------------------------------



But it doesn't work.