title: How can I replace \r\n with a line break when I echo?
body: <p>I am protecting my string using this code to insert it into the database:</p>
  
  <pre><code>function protect($string){
  
      $string = mysql_real_escape_string($string);
  
      return $string;
  }
  </code></pre>
  
  <p>I then unprotect it using this code so that I can echo it out from the database:</p>
  
  <pre><code>function echoprotect($string){
  
      $string = nl2br($string);
      $string = stripslashes($string);
  
      return $string;
  }
  </code></pre>
  
  <p>The nl2br doesn't seem to work and I don't know why. The output I get is:</p>
  
  <blockquote>
    <p>HellornrnThe content ect...</p>
  </blockquote>
  
  <p>instead of:</p>
  
  <blockquote>
    <p>hello</p>
    
    <p>the content ect...</p>
  </blockquote>