In PHP “\n” acts as the eol for the OS you’re on so that’s unreliable.
Also, I understand that PHP has constants for EOL, that’s not really what I’m asking, I want to know what EOL value I can reliably check for from browsers.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should take a look at the HTML spec: http://www.w3.org/TR/html401/struct/text.html
But in a nutshell I believe this will answer your question.
A line break is defined to be a carriage return
(
), a line feed(
), or a carriage return/line feed pair. All line breaks constitute white space.