Hello,
Yes, you just need to replace the placeholder by a WordFragment. We recommend you to read these pages:
http://www.phpdocx.com/documentation/practical/wordfragments-and-wordml
http://www.phpdocx.com/api-documentation/templates/replace-variable-word-fragment-Word-document
and the included examples of the replaceVariableByWordFragment method.
Regards.