Listen
$file = fopen("example.csv", "w"); $data = array( array("Name", "Age", "Email"), array("John Doe", 30, "[email protected]"), array("Jane Smith", 25, "[email protected]"), ); foreach ($data as $row) { fputcsv($file, $row); } fclose($file);
$file = fopen("example.csv", "w"); $data = array( array("Name", "Age", "Email"), array("John Doe", 30, "[email protected]"), array("Jane Smith", 25, "[email protected]"), ); foreach ($data as $row) { fputcsv($file, $row); } fclose($file);