title: PHP htmlspecialchars() function shows html safe tags in page
body: <p>I have a form that users fill it and send their questions, and then administrator will answer them and finally these questions will be shown in website.<br>
  To prevent attacks, I've used <strong>PDO</strong> and <strong>htmlspecialchars()</strong> function. I don't apply any change on input data and only store them using PDO. But when I want to show them in the page, I use htmlspecialchars(). But this caused that even <code>&lt;p&gt;</code> tags appear in the text as part of it. What is the problem and how can I solve it?  </p>
  
  <p><strong>Storing questions:</strong>  </p>
  
  <pre><code>$stmt = "INSERT INTO tbl_questions (title,question) VALUES (?,?)";  
  $q = $db-&gt;prepare($stmt);
  $q-&gt;execute(array($_POST['title'],$_POST['question']));
  </code></pre>
  
  <p><strong>Displaying questions:</strong></p>
  
  <pre><code>echo htmlspecialchars($title).'&lt;br /&gt;'.htmlspecialchars($question);
  </code></pre>