// Table with a spanned cell $templateProcessor->cloneRow('userId', 3); $templateProcessor->setValue('userId#1', htmlspecialchars('1')); $templateProcessor->setValue('userFirstName#1', htmlspecialchars('James')); $templateProcessor->setValue('userName#1', htmlspecialchars('Taylor')); $templateProcessor->setValue('userPhone#1', htmlspecialchars('+1 428 889 773')); $templateProcessor->setValue('userId#2', htmlspecialchars('2')); $templateProcessor->setValue('userFirstName#2', htmlspecialchars('Robert')); $templateProcessor->setValue('userName#2', htmlspecialchars('Bell')); $templateProcessor->setValue('userPhone#2', htmlspecialchars('+1 428 889 774')); $templateProcessor->setValue('userId#3', htmlspecialchars('3')); $templateProcessor->setValue('userFirstName#3', htmlspecialchars('Michael')); $templateProcessor->setValue('userName#3', htmlspecialchars('Ray')); $templateProcessor->setValue('userPhone#3', htmlspecialchars('+1 428 889 775')); // image $templateProcessor->setImage("imgPhpWord", "resources/PhpWord.png", "log.png", 30, 30); $templateProcessor->setImage("logo", "resources/PhpWord.png", "logoHeader.png", 30, 30); $templateProcessor->setImage("mars", "resources/_mars.jpg", "mars.jpg", 147, 141); echo date('H:i:s'), ' Saving the result document...', EOL; $templateProcessor->saveAs('results/Sample_07_TemplateCloneRow.docx'); echo getEndingNotes(array('Word2007' => 'docx')); echo "<h2>Structure du template </h2>"; function displayBlock($block, $name, $level = 0) { if ($level == 0) { echo "<strong>{$name}</strong><ul>"; } else { echo "<li><strong>{$name}</strong></li><ul>"; } foreach ($block->getInnerBlocks() as $keyBlock => $innerBlock) { echo "<li>";