Snippets
- Learn phpdocx in 5 minutes
- Tutorial
- API quick guide
- HTML to Word
- HTML Extended
- Conversion plugin
- Word to HTML
- DOCXPath
- Bulk processing
- DOCXCustomizer
- Digital signature
- Cryptophpdocx
- Right to left languages
- phpdocx CLI command
- Tracking
- Artificial Intelligence
- Blockchain for documents
- JavaScript API
- Compiled mode
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.