PHP code example of irebega / docx-replacer

1. Go to this page and download the library: Download irebega/docx-replacer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

irebega / docx-replacer example snippets


$docx = new \IRebega\DocxReplacer\Docx($pathToDocx);

$docx->replaceText($search, $replace);

$docx = new \IRebega\DocxReplacer\Docx($pathToDocx);

$docx->replaceTextInsensitive($search, $replace);

$docx = new \IRebega\DocxReplacer\Docx($pathToDocx);

$docx->replaceTextToImage($search, $path);