PHPOffice/PHPWord — pull request #44 by jeroenmoors (2013-12-16 16:31:58+00:00)
Title: Clone table rows on the fly when using a template document

This patch adds a function cloneRow() to the templating API.

The function cloneRow() allows you to clone the required number of times a row of a table in your template file.

The function takes two parameters, any template variable found on the specific row to identify the row to clone and the number of required rows.

All variables found on the table row will be suffixed with a # and a row number, so setValue can be used to set the variables values.

Some time ago a wrote a blog post how this works, maybe that clarifies all: http://jeroen.is/phpword-templates-with-repeating-rows/