Please check intermediate/Template_multitext.php example included on phpdocx pro.
A short example is:
-------------------------------------------------------
$text = array(
'David Hume',
'-----------',
'Bye'
);
$docx->addTemplateVariable('NAME', $text)
-------------------------------------------------------
Using this code the template placeholder will be replaced writing a new line for each array position.
Regards.