1. Go to this page and download the library: Download dhutapratama/mydocx 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/ */
dhutapratama / mydocx example snippets
use Dhutapratama\MyDocx\Docx;
// Initialization
$myDocx = new Docx('/mydir/template.docx');
$myDocx->setHeaderFooter(['text_to_find' => 'value to replace'])
->save();
$myDocx->setText(['text_to_find' => 'value to replace'])
->save();