Skip to content

Instantly share code, notes, and snippets.

@jsjohnst
Created August 17, 2012 23:25
Show Gist options
  • Save jsjohnst/3383436 to your computer and use it in GitHub Desktop.
Save jsjohnst/3383436 to your computer and use it in GitHub Desktop.
<?php
$input = $_SERVER["argv"][1];
$output = $_SERVER["argv"][2];
$fp = fopen($output, "w");
foreach(file($input) as $line) {
$fields = explode(chr(1), trim($line));
fputcsv($fp, $fields);
}
fclose($fp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment