I was just needing to be able to see what the hidden characters were at the end of a string so I could know what to remove and found this nifty ‘trick’ to see them. If you know of any other/better ways please post. Just echo the string with json_encode. You will be able to see all the \n and \r\n hidden characters.
[php]$str = “…”;
echo json_encode($str);[/php]