title: Replace '\n' with '<br>' PHP SQL table
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7370635/replacing-a-newline-with-a-br-php">Replacing a newline with a &lt;br&gt; - PHP</a>  </p>
  </blockquote>
  
  
  
  <p>I am presenting a table with information from my SQL database. When I insert into MySQL database I add:</p>
  
  <pre><code>\n
  </code></pre>
  
  <p>When I 'draw' the database I can just replace it with:</p>
  
  <pre><code>&lt;br&gt;
  </code></pre>
  
  <p>and it should add a new line. Here's what I tried and it doesn't seem to work. It doesn't replace the <code>\n</code> with <code>&lt;br&gt;</code> and I don't see what I did wrong.(Here is the code thats in the following picture if you'd like to test this yourself; <a href="http://pastebin.com/PgWKD5Mg" rel="nofollow noreferrer">http://pastebin.com/PgWKD5Mg</a>)</p>
  
  <p><img src="https://i.stack.imgur.com/7U3k2.png" alt="Image of me replacing the string"></p>
  
  <p>But that doesn't seem to work. It doesn't replace the strings, but if i replace <code>$row['Info']</code> with something like <code>Hello \n Test</code> it <em>does</em> print <code>hello</code> and <code>Test</code> onto seperate lines, that code renders this:</p>
  
  <p><img src="https://i.stack.imgur.com/qUAI2.png" alt="enter image description here"></p>
  
  <p>Note: <strong>nl2br function also does not work, and this does the same as that regardless</strong></p>