Forum


Replies: 5   Views: 2977
Html in table cell
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by developercoffeeshop  · 08-11-2018 - 06:40

Got it working by installing PHPtidy and validating the HTML, it seemed that & signs were causing some issues

$doc = new DOMDocument();
$data_text = str_replace(' ', ' ', $data_text);
$data_text = str_replace('&', '&', $data_text);
                                                                
$doc->loadHTML($data_text);

$html = new WordFragment($docx, 'document');
$html->embedHTML($doc->saveHTML());