title: Convert PHP file to Word doc and to open it in browser
body: <p>I like to convert my PHP file to Word document and I used this code</p>
  
  <pre><code>&lt;?php
      header("Content-type: application/vnd.ms-word");
      header("Content-Disposition: attachment; Filename=SaveAsWordDoc.doc");
  ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-1252\"&gt;
  &lt;title&gt;Saves as a Word Doc&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;Header&lt;/h1&gt;
    This text can be seen in word
  &lt;ul&gt;
  &lt;li&gt;List 1&lt;/li&gt;
  &lt;li&gt;List 2&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It works perfectly, it prompting me to open/save the document instead of rendering it like a normal webpage. But I need to open the same page in browser too.</p>
  
  <p>Is there any way to open a PHP page in web browser and also to make it save as word doc. If possible, give me code which prompting save as Word doc by clicking a button.</p>