Export MySQL table to Excel file using php script
You might want to export your data to view in excel so is’t more read able rather than reading the result in a mysql console’s. here’s how.
First you need to change the configuration to work well.
<?php
/**
* @author sapta
* @copyright 2009
*/
$cdate = date("Y-m-d"); // get current date
// configuration
$mysql_host = ‘localhost’;
$mysql_user = ‘root’;
$mysql_pass = [...]