title: How to write on a new line in a text file using PHP?
body: <p>I am trying to write in a text file using PHP. Every <code>$result</code> string must be on a new line in the txt file but when I am typing this all <code>$result</code> string is on the same line. What is the problem ?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$result=date("Y.m.d").'!'.$_POST['name'].'!'.$_POST['price'].'!'.$selectedGroup."\n";
  file_put_contents('data.txt', $result,FILE_APPEND)
  </code></pre>