I was trying to run the following code from tutorial:
$docx = new CreateDocx();
$text = array();
'text' => 'I am going to write'
'text' => ' Hello World!',
'b' => 'on'
'text' => ' using bold characters.'
and ran into the following error:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in C:\xampp\htdocs\phpdocx_community\classes\CreateText.inc on line 576
It looks like the function addText is unable to use $text as an input argument since it is an array. Did anyone run into this issue? I tried to convert the array into a string by using implode method but it didn't print the value as expected. Instead, it simply printed "ArrayArrayArray".