title: Split string in php with comma and new line
body: <p>Im trying to split string in PHP. I should split string using two delimiters: new line and comma. My code is:</p>
  
  <pre><code>$array = preg_split("/\n|,/", $str)
  </code></pre>
  
  <p>But i get string split using comma, but not using \n. Why is that? Also , do I have to take into account "\r\n" symbol?</p>