Skip to content

Instantly share code, notes, and snippets.

@mmohiudd
mmohiudd / csv_parser.php
Created September 17, 2012 16:17
Generic CSV parser
<?php // php csv_parser.php <table name> <csv target> <sql target>
ini_set('memory_limit', '8000M');
ini_set('max_execution_time', 3000);
if (empty($argc)) {
echo "Arguments missing";
exit(1);
}
if (!strstr($argv[0], basename(__FILE__))) {