Please please please can someone help me with this - I'm
going crazy not being able to work out how to do it!!
I have a form on a flash website; several single line inputs
and one multiline input textbox. I send it via a php page, but when
I get the email through the message part (from the multiline input
textbox) displays as one line, rather than having line breaks, eg
Message sent in flash:
I'm sending a message using your flash form.
Message displayed in email:
"Hello,I'm sending a message using your flash
How comes it will not add line breaks, no matter what I do?!!
Yeah, this can be a tricky one.
First, send the string from Flash - ie don't use escape() or
In PHP use the nl2br() function to convert the new line chars
to <br />
tags - and if you were sending HTML that's all you'd need
But if you want to maintain the line breaks in plain text,
you need to
replace the <br />'s with \n's: str_replace("<br
/>", "\n", $str)