It may be a bit late, but we encountered the same problem. While assigning a 1 element array to a template variable templates placeholder were repeated when in a table. The problem was still present in 3.2 and 3.3 version.
To overcome this first test if array count is greater than 1 (1 element). If only one element in your array, just assign the string variable of the array ($yourarray) to your variable :
$replacedata = explode("\n",$maybemultilinedata);
$docx->addTemplateVariable($var,(count($replacedata )>1) ? $replacedata :$replacedata );
r2363c / altidev team/ jca