Export csv file in php without tag
<p>I have create one csv file but that file contain html tag also..
Problem: generated csv file have html tag and other useless information also print.
I have required only no,emailid only.
i have try following code:</p>

<pre><code>&lt;?php
mysql_connect("localhost","root","");
mysql_select_db("XXXXXXX");
$query = "SELECT * FROM table";
//Now we're ready to create a file. This method generates a filename based on the current date &amp; time.
$filename = $file."_".date("Y-m-d_H-i",time());
//Generate the CSV file header
header('Content-Type: text/csv; charset=utf-8');
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header("Content-disposition: filename=".$filename.".csv");

$result = mysql_query($query) or die(mysql_error());
$vilaio='';
 $vilaio.="\n\tID\tEmail id\n";
 while($row = mysql_fetch_array($result)){
      $vilaio.="\n\t$row[eid_id]\t$row[eid_email]"; 
 }
print $vilaio;
?&gt;
</code></pre>

<p>What is problem in code!!</p>
