title: Line break from MySQL longtext to HTML via PHP
body: <p>I have multiple lines of text entered into a single MySQL longtext cell that I would like to display in HTML. However, I cannot figure out how to keep the line break when the string is displayed in HTML.</p>
  
  <p>For example, let's say I have this text in the column "content":</p>
  
  <pre><code>+-----------+
  |  content  |
  +-----------+
  | Line 1.   |
  |           |
  | Line 2.   |
  +-----------+
  </code></pre>
  
  <p>I want this to display:</p>
  
  <pre><code>Line 1.
  
  Line 2.
  </code></pre>
  
  <p>However, I am getting this result with my PHP loop:</p>
  
  <pre><code>Line1.Line2.
  </code></pre>
  
  <p>I used the loop below to <code>echo</code> the text from my database. (I know I don't need a loop, but in the actual project I am displaying multiple rows of data).</p>
  
  <pre><code>$query = mysql_query("SELECT * FROM table ORDER BY timestamp DESC");
  while($row = mysql_fetch_array($query)) {
      echo $row['title'];
  }
  </code></pre>
  
  <p>In sum: How can I maintain line breaks when displaying a MySQL string in HTML? Is there any way to add <code>&lt;br&gt;</code> at the line breaks?</p>