PHP code example of dskripchenko / php-docx-phpword
1. Go to this page and download the library: Download dskripchenko/php-docx-phpword 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/ */
dskripchenko / php-docx-phpword example snippets
use Dskripchenko\PhpDocxPhpWord\PhpWordBridge;
$html = PhpWordBridge::toHtml($phpWord); // clean HTML, inline styles
$phpWord = PhpWordBridge::fromHtml('<h1>Report</h1><p>Body with <b>bold</b>.</p>');
// … continue with PHPWord-native calls and writers