Question about \n...
Posted: Wed May 29, 2002 3:53 pm
I'm trying to send some pipe-delimited text lines to a file and place a newline at the end of each line. In the future I may also want to change this function to output html to the file, so i've built the routine so that I can specify the delimiter and line end strings so that they can be replaced with <tr>,<td>,</td>,</tr>, etc... When I do this:
it doesn't write the newline characters to the file, yet when I do this:
it does... why?
Code: Select all
$EndLine = "\n";
fwrite($fp, $BeginLine.$FirstPart.$Sep1."D".$Sep2.$SecondPart.$Endline);Code: Select all
fwrite($fp, $BeginLine.$FirstPart.$Sep1."D".$Sep2.$SecondPart."\n");