title: Export into MS-Word using PHP
body: <p>I want to export data to MS Word file using PHP on Windows and Linux operating system. I have written following code.</p>
  
  <pre><code>header("Content-type: application/vnd.ms-word");
  header("Content-Disposition: attachment;Filename=document_name.doc");
  
  echo "&lt;html&gt;";
  echo "&lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-1252\"&gt;";
  echo "&lt;body&gt;";
  echo '&lt;table cellpadding="0" cellspacing="0" border="0" width="100%"&gt;';
  echo '&lt;tr&gt;&lt;td&gt;test data&lt;/td&gt;&lt;/tr&gt;';
  echo '&lt;/table&gt;';
  echo "&lt;/body&gt;";
  echo "&lt;/html&gt;";
  </code></pre>
  
  <p>I have the MS Word file properly without table border when opened with MS Office 2007. But, if I open it with MS Office 2003 then I have the MS Word file with table border = '1'.</p>
  
  <p>How can I fix this problem? </p>