Forum


Replies: 7   Views: 4022
Adding html to table symbol
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 darghon-blocked  · 08-02-2015 - 19:39

Hi, sorry for the very late reply, tidy is installed on the server. The code used to replace the symbols is added below. [code] foreach ($globaldata as $function => $variables) { $data = $variables['data']; $data = $this->_filterUnusedVariables($usedVariables, $data); foreach ($data as $target => $d) { if($target == 'image') { foreach($d as $key => $value) $docx->replacePlaceholderImage($key, $value); } else { if (isset($d[0]) && !empty($d[0])) { $docx->replaceTableVariable($d, ['target' => $target]); } if (!empty($d)) { $docx->replaceVariableByText(isset($d[0]) && !empty($d[0]) ? $d[0] : $d, ['target' => $target]); } } } } [/code] Probably more code than needed, but the "replaceTableVariable" function is used. Because it's repeated data