Forum


Replies: 8   Views: 3787
Zero in wordfragment
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 neiron  · 27-02-2016 - 17:47

In topic: http://www.phpdocx.com/en/forum/default/post/4053

if text = 0, then table half-empty. Example:

$textFragment = new WordFragment($options['docx']);
  $text = array();
  $text[] =
    array(
      'text' => 'centered text',
      'underline' => 'single'
    );
  $paragraphOptions = array(
    'textAlign' => 'center',
  );
  $textFragment->addText($text, $paragraphOptions);

  $valuesTable = array(
    array(
      $textFragment,
    ),
    array(
      'Other text',
    ),
    array(
      'Other text',
    ),
  );

if replace 'text' => 'centered text' on 'text' => '0', then table clear cell value