Forum


Replies: 3   Views: 3370
Replace multiple occurrences of variable not working
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 pingtech  · 25-09-2012 - 20:35

I have a doc that I am using addTemplateVariable to substitute for the variables in a word doc. It works fine on the first occurrence, but not on any subsequent. Is there a better method, or any suggestions on how to accomplish this?

Or do I have to modify the addTemplateVariable to do this?

Example doc: (substituting for $filenumber")

File # $filenumber$
...
lots of stuff
...
File $filenumber$