Replies: 1   Views: 2890
Template table: replacing image while duplicating rows
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 pderep  · 07-06-2016 - 15:08


My template has a table within which there is an image to be replaced, while duplicating rows. The call replaceTableVariable() doesn't seem to accept anything other than text, how can I achieve this?

Thank you!

Posted by admin  · 07-06-2016 - 15:56


We recommend you to add placeholders instead of images in the table. After adding as many rows as needed using the replaceTableVariable method you can use replaceVariableByWordFragment to replace the placeholders by their new contents: image, text or any other content.