I need to be able to produce an X amount of Word Documents so i'm using PHPWord and a certain template.
I finally worked the replace Values issue but i'm stuck at inserting UTF-8 strings in the doc.(Greek)
echo mb_detect_encoding($date);
right before the insert shows UTF-8
.
Now i found the function that replaces them and it contains this
if(!is_array($replace)) {
$replace = utf8_encode($replace);
}
So i thought double encoding might mess it up. I removed that but then when i try to open the doc i just produced it won't. Some kind of error with the XML.
Anyone knows how can i bypass this? Or with what encoding should i insert the values to Word ?