title: PHP/HTML display hidden characters
body: <p>So, I have a bunch of code that I'm pulling from a column in MySQL. This code includes hidden characters, such as "\t" and "\n".</p>
  
  <p>I'm trying to get that raw code to display in a DIV. I was hoping to actually show the hidden characters. I have the following so far, without much luck:</p>
  
  <pre><code>&lt;?php
  // Simple example: replace all newlines with their character equivalent
  $value = str_replace("\n", '\n', $value);
  echo htmlentities($value);
  </code></pre>
  
  <p>Any ideas?</p>