title: After decoding HTML using html_entity_decode it doesn't display properly
body: <p>I'm having an issue with some HTML that I'm decoding and then displaying.</p>
  
  <p>I post data from a WYSIWYG text editor called TinyMCE and store it into a database using the following code (with unrelated code not included)</p>
  
  <pre><code>$text = $_POST['bbcode_field']; // from textarea
  if(get_magic_quotes_gpc()){
       $text = stripslashes($text);
       //strip off the slashes if they are magically added.
  }
  $text = htmlentities($text);
  </code></pre>
  
  <p>I then enter the data into the database using the following</p>
  
  <pre><code>Report ='".htmlspecialchars(mysql_real_escape_string($text), ENT_QUOTES)."',
  </code></pre>
  
  <p>Which is great, it inserts into the database perfectly fine. When I then try to retrieve the data from the database and decode it using</p>
  
  <pre><code>'.html_entity_decode($row['Content']).'
  </code></pre>
  
  <p>and echo it out, it's echoes it out but includes the HTML formatting such as <code>&lt;p&gt;</code> tags etc.</p>
  
  <p>I need to be displayed on the HTML page but using the formatting of the HTML tags.</p>
  
  <p>Where have I gone wrong here?</p>
  
  <p>Thanks.</p>