Forum


Replies: 2   Views: 707
Using gettemplatevariables with ##
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 websurfermedia  · 23-09-2022 - 02:05

Hi Guys,

We were running version 10.0 Premium ad just  updated to 13.0 Premium.

It seems the function getTemplateVariables just stopped working, same code, same docx template. Worked perfectly with version 10. Has something changed that would cause this? The following code snippet returns an empty array, previous retured the array of placeholders

$docx = new \Phpdocx\Create\CreateDocxFromTemplate(template.docx');
$docx->setTemplateSymbol('##'); // Placeholder identified with ## ... ##
dd($docx->getTemplateVariables());

Andrew