function parseIT($file, $delim = " ", $encapsulator = array("\"", "'")) {
$parsed = array();
$lines = file($file);
foreach ($lines as $key => $line) {
$columns = explode($delim, $line);
foreach ($columns as $k => $column) {
$column = str_replace($encapsulator, "", $column);
$parsed[$key] = array($k => $column);
}
}
return $parsed;
}
//USAGE
parseIT('myfile.csv');
