When do I use PHP_EOL instead of \n and vice-versa ? Ajax/Jquery client problem
问题 I have a php parser that split a given string by line-breaks, doing something like this: $lines = explode(PHP_EOL,$content); The parser works fine when working on server side. However, when I pass the content via post by ajax (using jquery's $.post method) the problem arises: line breaks are not recogniezed. So after almost an hour of tests and head-aches I decided to changed PHP_EOL by "\n" and it worked: $lines = explode("\n",$content); Now it works! Damn it I lost so much time! Could