Forum Moderators: coopster
I want to create a text file that contains SQL statements line by line.
But instead, it all gets dumped on one line:
This is my script
$file = fopen("dump.sql", "a+");
$str = "\nINSERT INTO table";
fputs($file, $str);
fclose($file);
It seems to completely ignore the \n character. All it does is appends a square to the end of the file. But it doesn't allow you to write on the next line.
What am I doing wrong?
Thanks
Hannah