Problem is I can't see any " near line. And it worked fine the first time. What am I missing?
Thankyou.
Expand|Select|Wrap|Line Numbers
- <?php
- include("config.php");
- include("opendb.php");
- $fcontents = file ('mysqldata.csv');
- for($i=0; $i<sizeof($fcontents); $i++) {
- $line = trim($fcontents[$i]);
- $arr = explode(",", $line);
- $sql = "insert into results values ('','".
- implode("','", $arr) ."')";
- mysql_query($sql);
- if(mysql_error()) {
- echo mysql_error() ."<br>\n";
- }
- }
- ?>