title: How to remove HTML tags in CSV file- PHP
body: <p>I am trying to download CSV file from php values. But the output file is included with all the html tags.
  I have used the following part of code for CSV file.</p>
  
  <pre><code>     header('Content-Type: application/x-csv');
       header('Content-disposition:attachment;filename=file.csv');
  </code></pre>
  
  <p>CURRENT OUTPUT:</p>
  
  <pre><code> &lt;tr&gt;&lt;td&gt; 2017-11-05 10:38:05 &lt;/td&gt; &lt;td&gt;  3 &lt;/a&gt; &lt;/td&gt; &lt;td&gt;  Full Speed &lt;/a&gt; 
   &lt;/td&gt;&lt;td&gt;56&lt;/td&gt;&lt;td&gt; &lt;div id= "level2" &gt; Level 2 &lt;/div&gt; &lt;/td&gt;&lt;/tr&gt; 
   &lt;tr&gt;&lt;td&gt;2017-11-05 10:37:03 &lt;/td&gt; &lt;td&gt; 
  </code></pre>
  
  <p>Expected OUTPUT:</p>
  
  <pre><code> 2017-11-05 10:38:05, 3 , Full , Level 2 , 2017-11-05 10:37:03.
  </code></pre>
  
  <p>NOTE: data is extracted from array variables in php (not from sql/database)</p>