title: PHP file write with a new line
body: <p>I'm making a chat room with a text file. Very simple, but I don't want it to put a damper on the server. Anyways. When I try to make a message, it puts the appended message on the same line like this</p>
  
  <pre><code>Alan,5/6/12,message&lt;br&gt;Joe,5/6/12,hello&lt;br&gt;
  </code></pre>
  
  <p>I'd like it to be</p>
  
  <pre><code>Alan,5/6/12,message
  Joe,5/6/12,hello
  </code></pre>
  
  <p>This is what I have.</p>
  
  <pre><code>$total = 'Alan,5/6/12,hello joe&lt;br&gt;\r\n';
  $fn = "messages.txt";
  $file = fopen($fn,"a");
  fwrite($fn,$total);
  fclose($fn);
  </code></pre>
  
  <p>Thanks.</p>