i'm trying to import the txt file. Using fgetcsv a hole line is stored in a variable, then i imploded it, \t as pattern, bu that leads me an array with empty spaces (probably aditional tabs), so i don't know how may i get rid of this or how to do the query, as there will be elements without the needed values. I still don't know if this will be a pattern for all lines (if it's so i can just jump them when using query). Can someone help me?
$line = fgetcsv($fileopn, "\t"); $c = count($line); print("$c\n"); $line_str = implode("\t", $line); print_r($line_str); print("\n"); $fields = explode("\t",$line_str); $c2 = count($fields); print("$c2\n"); print_r($fields);