Snippets
- Learn phpdocx in 5 minutes
- Practical guide
- 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
- JavaScript API
- JSON API
- Artificial Intelligence
- Compiled mode
- Blockchain for documents
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.