title: When do I use PHP_EOL instead of \n and vice-versa ? Ajax/Jquery client problem
body: <p>I have a php parser that split a given string by line-breaks, doing something like this:</p>
  
  <pre><code>$lines = explode(PHP_EOL,$content);
  </code></pre>
  
  <p>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:</p>
  
  <blockquote>
    <p>$lines = explode("\n",$content);</p>
  </blockquote>
  
  <p>Now it works! Damn it I lost so much time! Could somebody explain me when use PHP_EOL and "\n" properly, so I can save time in the future? Appreciate your kind answers ;)</p>