[code]
if ($i == 0 || $i == count($documentSymbol) || $documentSymbolValue[0] == '<')
[/code]
is almost always true.
I modified the code in similar way as mquadrat:
[code]
$documentSymbol = explode(self::$_templateSymbol, self::$_document);
foreach ($documentSymbol as $i => $documentSymbolValue)
{
if ($i % 2 != 0)
$variables['document'][] = strip_tags($documentSymbolValue);
}
[/code]
Please let us know what was the reason you prepared the condition in such form, so we can be sure that our modifications won't break other functionality?
I am using latest PHPDocx PRO version 2.7