Tag Archives: output to file

PHP – Writing to File (new line)

It seems easy enough to use the <br /> tag in HTML to output your text on a new line. In PHP, many of you know that to move your cursor to a new line you can use the “backslash  r” escape sequence.

And still many of us still make mistakes by using single quotes around this sequence. To make this work use DOUBLE quotes around “\r” which provides escape sequence and moves the cursor to a new line.