2012/1/9 rpallotta <[email protected]>:
>
> I need to import a file to a table but there are two delimiters used in the
> file; quotes and spaces. The first 2 columns are for metadata and use
> quotes, the remaining columns are financial data (a column for each month)
> separated by spaces. For example:
>
> "Net Sales" "New York" 1000.00 999.00 1112.00
> "Expenses" "New York" 555.00 600.00 500.00
<?php
$f = fopen("example.csv", "r");
$data=fgetcsv($f, 1000, " ");
print_r($data);
?>
[0] => Net Sales
[1] => New York
[2] => 1000.00
[3] => 999.00
[4] => 1112.00
--
Kit
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users