Skip to content

Instantly share code, notes, and snippets.

@umairidrees
Last active December 29, 2015 07:49
Show Gist options
  • Save umairidrees/7638637 to your computer and use it in GitHub Desktop.
Save umairidrees/7638637 to your computer and use it in GitHub Desktop.
here I have shared an easy code for how to save data in csv format using php
$file = fopen("_file.csv","w");
foreach ($vals as $val)
{
$result = array($val[0],$val[1],$val[2]);
fputcsv($file,$result);
}
fclose($file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment