How to convert html to word using php?
<p>I am trying to convert <strong>HTML to MS WORD document (.doc/.docx) with PHP script</strong>. With the available scripts from internet I am able to convert the  text of HTML to doc. But I need total html with inline css will be in my doc.I made one script </p>

<pre><code>$html = file_get_contents('html path');
$tags = "&lt;br&gt;";
$test = strip_tags($page,$html);
$breaks = array("&lt;br /&gt;","&lt;br&gt;","&lt;br/&gt;");  
$text = str_ireplace($breaks, "\r\n", $test);  
$text = iconv('UTF-8', 'ASCII//TRANSLIT',$text);
$handle = fopen("newdoc.doc", "w+");
fwrite($handle, $text);
fclose($handle);
</code></pre>

<p>It's working for the text content of HTML only.
But I can't add images to it is there any way to do it ? Please Help, Thanks in advance.</p>