Is there any way to have PHP output a string with the \\r\\n and \\n\'s as actual text instead of linebreaks? I\'m seeing an interesting issue where an explode() on \\n\'s isn\'
Escape them before printing.
echo '\\r\\n';
Try
$string = str_replace(array("\r", "\n"), array('\r', '\n'), $string);
echo str_replace(array("\n", "\r"), array('\n', '\r'), $input);
Did you try escaping your slashes with another slash?