This is almost perfect for me to ask my question-
I'm in pretty much the exact same situation- writing a text file for flash. I've got a screen where a user can enter in text and the form writes the text file from that input.
I want to enable my user to use carriage returns and to replace them with <br>'s, because in flash the variable must be a string on a single line or else the line breaks are much larger, like the equivalent of doing two or three <br>'s. So I went-
$textAreaStr = str_replace(Chr(13), "<br>", $textAreaStr); but instead of
blah blah blah<br>blah blah<br>
I got
blah blah blah<br>
blah blah<br>
etc. How do I actually get rid of the carriage returns? Any ideas?