【发布时间】:2013-06-29 21:20:52
【问题描述】:
我正在创建一个文档,该文档将在一个页面上包含多个编号列表,并创建了两个列表定义,如下所示:
${'references_' . $testcase} = array('listType'=>PHPWord_Style_ListItem::TYPE_NUMBER_NESTED);
${'procedure_' . $testcase} = array('listType'=>PHPWord_Style_ListItem::TYPE_NUMBER_NESTED);
然后在循环中调用它们以添加到列表中:
for ($i = 1; $i <= 10; $i++) {
$body->addListItem('List Item ' . $i, 0, null, ${'references_' . $testcase});
}
for ($j = 1; $j <= 10; $j++) {
$body->addListItem('List Item ' . $j, 0, null, ${'procedure_' . $testcase});
}
但是,第二个列表编号从 11 开始 - 我怎样才能将其设置回 1?
【问题讨论】: