Forum


Replies: 3   Views: 3351
Use replacetablevariable between two specific placeholders
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 krishna shah  · 10-12-2015 - 07:57

Hello,
When using a replaceTableVariable, it replaces all the variables available in any other table with the same name in word document. Can I use replaceTableVariable for only single table? Or Is it possible to replace variables between two specific placeholders?

e.g.
$startReport$
     First Name  | Last Name
     $firstname$ | $lastname$
$endReport$

And I need to replace these $firstname$ and $lastname$ variables (with single or multiple values) between $startReport$ and $endReport$ only. $firstname$ or $lastname$ should not be replace if they exist in any other section within same document.