Find And Replace in PHP

Aspose.Words - Find And Replace

To replace text using Aspose.Words Java in php, simply invoke the replace() method.

Php Code

 // The path to the documents directory.
 $doc = new Java("com.aspose.words.Document","ReplaceSimple.doc");

 // Replace the text in the document.
 $doc->getRange()->replace("_CustomerName_", "James Bond", false, false);
 }

Download Running Code

Download Find And Replace (Aspose.Words) from any of the below mentioned social coding sites: