Forum


Replies: 2   Views: 2697
Print out blank rather than $var$
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 maxelcat  · 30-01-2018 - 16:18

Hi

I have a simple table template with four columns. In some cases there is no data for the last two columns and partial data in the first two. I am creating an array ($tabledata) that holds arrays of data - so that one line might be like this Array ( [SUB] => Number [AB0] => M8b ) - its subject/grade data.

The first two columns are fine- where there is no data I am getting a blank. However, in the last two columns I get the variable names (like $AB2$ ) printing out into every square.

Is there someway to tell phpdocx not to print out these values from the template when using $docx->replaceTableVariable($tabledata)

Many thanks


E