title: \n vs. PHP_EOL vs. <br>?
body: <p>In most cases, as for one interactive website, when we output multiple lines of contents to web client browser,  in my opinion, <code>&lt;BR /&gt;</code> is much more preferable than other two: <code>\n</code> or <code>PHP_EOL</code>.</p>
  
  <p>Else, we need to use "<code>&lt;pre&gt;&lt;/pre&gt;</code>" to wrap the output content or use <code>nl2br()</code> to insert <code>&lt;BR /&gt;</code> before <code>\n</code> so as the multiple line mark can take effect in HTML. Like following example.</p>
  
  <pre><code>$fruits = array('a'=&gt;'apple', 'b'=&gt;'banana', 'c'=&gt;'cranberry');
  
  // Multiple lines by \n
  foreach( $fruits as $key =&gt; $value ){
      echo "$key =&gt; $value \n" ;
  }
  
  // Multiple lines by PHP_EOL
  reset( $fruits );
  while ( list($key, $value) = each( $fruits ) ){
      echo ("$key =&gt; $value" . PHP_EOL);
  }
  
  // Multiple lines by &lt;BR /&gt;
  reset( $fruits );
  while ( list($key, $value) = each( $fruits ) ){
      echo ("$key =&gt; $value &lt;BR /&gt;");
  }
  </code></pre>
  
  <p>Some people believe <code>PHP_EOL</code> is useful when writing data to a file, example a log file. It will create line breaks no matter whatever your platform.</p>
  
  <p>Then, my question is when we use <code>\n</code>? What's the difference between <code>\n</code> and <code>PHP_EOL</code>, and <code>&lt;BR /&gt;</code>? Could any body have a big list of each of their pros and cons?</p>