PHP code example of bingo-soft / phpdocxtemplate

1. Go to this page and download the library: Download bingo-soft/phpdocxtemplate 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/ */

    

bingo-soft / phpdocxtemplate example snippets


use PhpDocxTemplate\PhpDocxTemplate;

$doc = "./templates/template1.docx";
$template = new PhpDocxTemplate($doc);
$template->render(["one" => "1", "two" => "2", "three" => "3", "four" => "4"]);
$template->save("./documents/report.docx");