我正在尝试在 PHPWord 中编写一个表格,该表格在一个单元格中具有多种文本格式,例如在 HTML 中:
<table>
<tr>
<td><b>L</b><sub>1</sub> = 999</td>
</tr>
<tr>
<td>Blah</td>
</tr>
</table>
我会这样写:
$table = $section->addTable('myOwnTableStyle');
$table->addRow();
$table->addCell(5000)->addText("HOW WOULD I STRING MULTIPLE TEXT FORMATS IN HERE WITH BOLD AND SUBSCRIPTS IN THIS CELL? IS THERE A CONCATENATE?");
$table->addRow();
$table->addCell(5000)->addText("Blah");