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 c
Hmm, that should be working... Maybe the newline characters are actually carriage returns? In which case, something like this would be flexible:
// Simple example: replace all newlines with their character equivalent $value = preg_replace('/[\r\n]+/', '\n', $value); echo htmlentities($value);