Answers for "phpword foreach one word save as"

PHP
1

phpword foreach one word save as

<?php
require './modules/vendor/autoload.php';
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor(__DIR__ . '/wordfile.docx');
foreach ($tashkilot as $itemtwo) {
    $replacements[] = [
        'country' => $itemtwo->no,
        'date' => $itemtwo->sana,
    ];
}

if (!file_exists(UPLOAD_PATH . '/folder/' . $nomi->chiqnm . " " . shaklqisqa($nomi->chiqsh, $nomi->chiqnm) . '.docx')) {
    $templateProcessor->cloneBlock('nameblock', 0, true, false, $replacements);
    $templateProcessor->saveAs(UPLOAD_PATH . '/folder/' . $nomi->chiqnm . " " . shaklqisqa($nomi->chiqsh, $nomi->chiqnm) . '.docx');
}
Posted by: Guest on September-04-2021

Browse Popular Code Answers by Language