Forum Moderators: coopster
<?
$text="here is line 1 \n here is line 2 \n here is line 3 \n";
$file = "test.txt";
$temp = fopen($file, "w");
fputs($temp,stripslashes($text));
fclose($temp);
?
Essentially its a really simple script which just writes 3 sentences, each on a new line. The problem im having is that when I open up my txt document everything is appearing on 1 line instead of 3, with the newline character appearing as a small square. Any suggestions?