Can someone tell me the difference in using '\n' and "\n"? Anytime I add '\n' to my php echos the source code doesn't include line breaks, but if I use "\n" it does.
Asked
Active
Viewed 41 times
1 Answers
2
Single quotes define what is called a literal string, escape sequences will be interpreted literally, for example 'abc\ndef'
will literally be interpreted as abc\ndef
as opposed to abc<newline>def
.

Prime
- 2,410
- 1
- 20
- 35
-
Ah. I didn't know there was that big of a difference. I believe it is time to edit some of my codes to improve them. Thanks. – Jesse Elser May 27 '15 at 02:57