title: php echo from database with break lines
body: <p>This is a simple question I believe, but can't figure it out yet.
  I have a text area that after submit goes to a database, and then I echo this text on a page, but here is the problem, say the person writes on the textarea:</p>
  
  <blockquote>
    <p>Hi Robert,<br />This is just a test!.<br />
    Jason.</p>
  </blockquote>
  
  <p>And the message goes to the database just like that, but when I echo that, I get:</p>
  
  <blockquote>
    <p>Hi Robert, This is just a test!.
    Jason.</p>
  </blockquote>
  
  <p>This is the form:</p>
  
  <pre><code>&lt;textarea name="newMessage" wrap="hard" cols="30" rows="3"&gt;&lt;/textarea&gt;
  
  &lt;input type="submit" name="submit" value="Ingresar"&gt; &lt;/&gt;
  </code></pre>
  
  <p>This is the code I use to display the text:</p>
  
  <pre><code>&lt;?php   
      while($row = mysql_fetch_assoc($messages)){
          echo $row['mensaje']."&lt;br/&gt;";
      }
  ?&gt;
  </code></pre>
  
  <p>This is what I use to insert the code:</p>
  
  <pre><code>if(isset($_POST['submit'])){        
  
              $check4LB = $_POST['newMessage'];
              while($letter = mysql_fetch_assoc($check4LB)){
                  if($letter=' '){
                  $letter='&lt;br/&gt;';
                  }
              } /////I know this is not write bu is the idea i thgouht at least
  
              $query = mysql_query("SELECT (ifnull(max(idRegistro),0) + 1) as id FROM messages");
              $row = mysql_fetch_array($query);
              $idMax = $row['id'];     
              $insertMessage = "INSERT INTO messages(idRegistro, mensaje) VALUES ('".$idMax."','".$letter."')";
  
               mysql_query($insertMessage) or die(mysql_error());
               echo "&lt;meta http-equiv=Refresh content=\"0 ; url=".$_SERVER['PHP_SELF']."\"&gt;"; 
     }
  </code></pre>