I have the following code.
$docx = new CreateDocx();
$item1 = new WordFragment($docx);
$item1->addText(array("text" => 'Chapter 1', "bold" => true));
$item2 = new WordFragment($docx);
$item2->addText('Section');
$item3 = new WordFragment($docx);
$item3->addText('Another TOC entry');
$item2->addBreak(array("type" => "line", "number" => 1));
$item2->addText("After the break.");
$itemList= array(
"blah",
array($item1),
array($item2),
array($item3)
);
$docx->addList($itemList);
If you notice, I used the addText option of an array in the 4th line above for $item1. All the other items show up on the list just fine. However $item1 just shows up as a blank line. I looked in the documentation and there doesn't seem to be anything that indicates this shouldn't work.
Thanks,
Andrew