phpword表vmerge和gridspan

phpword表vmerge和gridspan,php,codeigniter,phpword,Php,Codeigniter,Phpword,我正在尝试使用PHPWord创建一个表,该表应如下所示: 有些行包含2个单元格,有些行包含4个单元格 ------------------------ | | | |----------------------- | | | ------------------------ | | | | | |----------------------- 这是我代码的

我正在尝试使用
PHPWord
创建一个表,该表应如下所示: 有些行包含2个单元格,有些行包含4个单元格

------------------------
|     |                | 
|-----------------------
|     |                |
------------------------
|     |     |     |    |                
|-----------------------
这是我代码的一部分

    $table->addRow(200);
    $table->addCell(2000, $styleTitleCell)->addText(htmlspecialchars('text'), $fontTitle);
    $table->addCell(15000, $styleCell)->addText(htmlspecialchars('textVULN'), $fontTitle);

    $table->addRow(600);
    $table->addCell(2000, $styleTitleCell)->addText(htmlspecialchars('Référence'), $fontTitle);
    $table->addCell(15000, $styleCell)->addText(htmlspecialchars(' text'), $fontStyle);

    $table->addRow(600);
    $table->addCell(2000, $styleTitleCell)->addText(htmlspecialchars('text'), $fontTitle);
    $table->addCell(15000, $styleCell)->addText(htmlspecialchars('constats ici'), $fontStyle);

    $table->addRow(600);
    $table->addCell(2000, $styleTitleCell)->addText(htmlspecialchars('text'), $fontTitle);
    $table->addCell(15000, $styleCell)->addText(htmlspecialchars('text'), $fontStyle);
    //elements impactés
    $table->addRow(600);
    $table->addCell(2000, $styleTitleCell)->addText(htmlspecialchars('Eléments impactés'), $fontTitle);
    $table->addCell(15000, $styleCell)->addText(htmlspecialchars('Les elements ici'), $fontStyle);


    $table->addRow(600);
    $table->addCell(2000, $styleTitleCell)->addText(htmlspecialchars('text'), $fontTitle);
    $table->addCell(15000, $styleCell)->addText(htmlspecialchars('text'), $fontStyle);


    $table->addRow(600);
    $table->addCell(2000, $styleTitleCell)->addText(htmlspecialchars('text'), $fontTitle);
    $table->addCell(2000, $styleCell)->addText(htmlspecialchars('text'), $fontStyle);
    $table->addCell(2000, $styleTitleCell)->addText(htmlspecialchars('text'), $fontTitle);
    $table->addCell(2000, $styleCell)->addText(htmlspecialchars('text'), $fontStyle);
这就是我得到的:

----------------------
|     |              | 
|---------------------------------
|     |              |     |     |
----------------------------------

找到它,我必须添加数组($table->addCell(15000,数组($gridSpan'=>3))->addText(htmlspecialchars('text'),$fontTitle);)

找到它,我必须添加数组('gridSpan'=>3)($table->addCell(15000,数组('gridSpan'=>3))->addText(htmlspecialchars('text'),$fontTitle);)写一个答案并将其标记为已解决。