Title says it all really. I am reading in a 4 column tab delimited file saved from MS Excel. It trips up when it reads the last column (description). It is all going fine until the description text has an apostrophe, where my php code gives the error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't treat it as such" ')' at line 1 The phrase being imported is "didn't treat it as such" Here's my php code: [code] $fcontents = file ('startup.txt'); for($i=0; $i<sizeof($fcontents); $i++) { $line = trim($fcontents[$i], '\t'); $arr = explode("\t", $line); $sql = "insert into startup values ('". implode("','", $arr) ."')"; mysql_query($sql); echo $sql ."<br>\n"; if(mysql_error()) { echo mysql_error() ."<br>\n"; } } ?> [/code] The MySQL database has 4 cols, all are VARCHAR. I have tried changing the problem column to TEXT with the same error. Thanks in advance