hey all, I'm getting an excel file and I have to save it as a tab deliminated text file then I do a load data infile into my database...
well that works fine but in the text file some of the descriptions have " " (quotes around them)
like instead of the product name being: jims red truck its coming out as "jims red truck"
any way to cut the first and last char off a string if it matches " ?
or is there a way in excel to stop outputting those quotes around my desc? cause they don't have them when you open the exel file, only when I output it to text. thanks all!
String Function for taking the first & last characters?
Moderator: General Moderators
I don't know if you can omit the " within excel butorgets rid of it.
Code: Select all
$str = substr($file, 1, strlen($str)-2);Code: Select all
$str=preg_replace("/"(.*)"/", "$1", $str);