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.
replaceVariableByWordFragment footer not replacing.
$wf = new WordFragment($docx,'footers');
$wf->addText($erow['EntityName']);
$docx->replaceVariableByWordFragment(array('EntityName' => $wf), array('type' => 'inline','target'=>'footers'));
$docx->replaceTableVariable($data);
$docx->createDocx('report'');
Hello,
The feature to replace placeholders by WordFragments in headers and footers is available since phpdocx 4.6, please check you're using this version.
To replace the placeholders in the footers you need to use 'footer'. For example:
$docx->replaceVariableByWordFragment(array('EntityName' => $wf), array('type' => 'inline','target'=>'footer'));
Regards.