$lines = file('array2.txt');
foreach($lines as $line)
{
mysql_query("INSERT INTO test (Tweet, Date) VALUES ('$line', '22')");
}
Hi All,
I am trying to use the code above to use the file() function to add lines from a text file into an array, so I can then place it in a mysql database. The file I am using contains a 100 lines, but using the function above I end up with over 116,000. Does anyone known how what is causing this? Thank you in advance.