rawSearchAndReplace

rawSearchAndReplace

ADVANCED / PREMIUM TRIAL

Searches and replaces texts in any XML file of the document.

Description
public rawSearchAndReplace (string $document, string $finalDocument, string $searchTerm, string $replaceTerm)
Parameters

document

Source DOCX.

finalDocument

The destination path of the new file.

searchTerm

String to replace.

replaceTerm

New string.

Code samples

Example #1:

Release notes
  • phpdocx 15.0:
    • in-memory DOCX documents.
  • phpdocx 6.5:
    • new method.