Prova così:
codice:$data = file('ip-to-country.csv'); foreach($data as $value){ list($range_from, $range_to, $code2, $code3, $full_name) = explode(',', trim(str_replace('"', '', $value))); sqlite_query($db," INSERT INTO ip_to_country ('ip_in', 'ip_out', 'initials_2', 'initials_3', 'full_length') VALUES ( '{$range_from}', '{$range_to}', '" . addslashes($code2) . "', '" . addslashes($code3) . "', '" . addslashes(trim($full_name)) . "' ) "); }