Forum


Replies: 4   Views: 1415
Escape single template 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 ascendware  · 30-09-2020 - 17:06

Hi, sorry if my question is unclear.

I am working on creating a document from templates and is using the dollar($) template symbol to wrap my variable tags.

Ex: $VAR_1$, $VAR_2$, etc..

Everything is working great. However, when it comes to replacing amount/money into the document, the dollar sign has to be used on the template as a unit of currency and not as a delimiter for variable tags.

My question is, is there a way to escape it? Like how we use backslashes to escape single/double quotes from a string?

Example: $$TOTAL_AMOUNT$