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