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".
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:
<?php
// Simple example: replace all newlines with their character equivalent
$value = str_replace("\n", '\n', $value);
echo htmlentities($value);
Any ideas?