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.

5 thoughts on “PHP – Writing to File (new line)

  1. Jeremias Tamayo Paz

    Thanks for your nice experience to share with us. Really awesome article with plenty of informative things to be known for us.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *