title: HTML Table not recognising line breaks from mysql database
body: <p>I have a mysql database with an 'address' field (VARCHAR). I also have a html table that is used to display the addresses of different staff members. </p>
  
  <p>My problem is that data is stored in the address field of the database with linebreaks between each line of the address, but when the data is displayed in the table the line breaks are not there, so the entire address is displayed on one line. How can I fix this?</p>
  
  <p>I'm sure this is a question that is asked all the time, but I can't find the answer anywhere. I'm new to PHP so please forgive my naivety. </p>
  
  <p>UPDATE:</p>
  
  <p>This is basically my code: </p>
  
  <pre><code>if(isset($_POST['submit'])) {
  
  $address  = $_POST['address'];
  
  $queryupdate = "UPDATE Staff SET 
        address= :address WHERE id= :id";
  $q = $db-&gt;prepare($queryupdate);
  $q-&gt;execute(array(
          ":id"    =&gt; $id,
          ":address"  =&gt; $address));
  </code></pre>
  
  <p>The data in the <code>$address</code> variable is taken from a simple textarea.</p>