title: PHP: make a new line on file_put_contents
body: <p>I have trawled online looking for a working example, but I must be missing something, as it has been answered numerous times but I can't get it working. </p>
  
  <p>I'm trying to send data ($file) to an html file. I can echo /print no bother but can't break a new line when sending to a html file via file_put_contents. I've tried "\r\n" with no success. </p>
  
  <p>I'm using Chrome. This is the code I thought should work:</p>
  
  <pre><code> $someData = $_POST['someData'];
   $file = 'file.html';
  
   file_put_contents($file, $someData . PHP_EOL, FILE_APPEND);
  </code></pre>