Snippets

Replace placeholders in all targets

By default, phpdocx template methods replace placeholders in the main document. To replace in other content of the document you must set it in the target option.

The following code replaces placeholders in all targets:

This snippet can be used along with other placeholder replacement methods.