Forum


Replies: 3   Views: 3512
Search and replace more different strings in same document
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 erainferno  · 22-05-2013 - 19:51

Would it not be easier to use the replace variable?



$docx = new CreateDocx();

$docx->addTemplate('Template.docx');



for($index=1; $index <$numberofstrings;$index++){



          $docx->addTemplateVariable('string'.$index,'string'.$index);



}



$docx->createDocx('Files/Report');