addSection();
$html = '
Adding element via HTML
';
$html .= 'Some well formed HTML snippet needs to be used
';
$html .= 'With for example some1 inline formatting1
';
$html .= 'Unordered (bulleted) list:
';
$html .= '';
$html .= 'Ordered (numbered) list:
';
$html .= '- Item 1
- Item 2
';
\PhpOffice\PhpWord\Shared\Html::addHtml($section, $html);
// Save file
echo write($phpWord, basename(__FILE__, '.php'), $writers);
if (!CLI) {
include_once 'Sample_Footer.php';
}