title: How to save a text string with line breaks to a MySQL database text field using PHP?
body: <p>In SugarCRM I have a Textarea field that I am trying to save data to with line breaks.</p>
  
  <p>IF I insert <code>&lt;br&gt;</code> tags, then they show up as text break tags.   If I try something like <code>\n</code> then it also shows up as text.</p>
  
  <p>Now if I go into SugarCRM and edit a record, I can type in text and make a linebreak.  Save the record and view it again and the line breaks show up as I would want them to!</p>
  
  <p>I am trying to save data with line breaks to the same field from a remote API script.</p>
  
  <p>I went into the Database with phpMyAdmin to see how the field looked and here it is...</p>
  
  <p>The first 3 lines have proper line breaks which I made inside SugarCRM editing a record manually.</p>
  
  <p>The line after are from my remote API script where I had saved <code>&lt;br&gt;</code> tags into the string.</p>
  
  <pre><code>Line 1 Text: ghfghdf
  Line 1 Color: #0064FF
  Line 1 Font: Architect
  Line 2 Text: fghfg&lt;br /&gt; Line 2 Color: #9F00FF&lt;br /&gt; Line 2 Font: Belshaw&lt;br /&gt; Line 3 Text: fghdhdhdf&lt;br /&gt; Line 3 Color: #FF5000&lt;br /&gt; Line 3 Font: Benguiat&lt;br /&gt;
  </code></pre>
  
  <p><strong>Any ideas how I can make my PHP code save a string to this field and have line breaks when viewing it in the database just like the first 3 lines above are?</strong></p>