html: Need help: Common problem with TEXTAREA: \r\n problem?

Vergus Lee

New member
Hello. If the form filled wrong, it returns back.
But, the text
John Johnson,
123 street ave,
Somecity,
Somestate 12345

displayed this way in the TEXTAREA

John Johnson,\r\n 123 street ave, \r\n Somecity,\r\n Somestate 12345

The only thing I did was using php code
str_replace("\r\n"," ", $address) to display it within <textarea>...</textarea>
So, the result is John Johnson, 123 street ave, Somecity, Somestate 12345 - it's better, but still not good.

Could anybody tell me what should I do to display it not as string, but in originally manner?

BTW, str_replace("\r\n","<br/>", $address) doesn't work, it displays "John Johnson, <br/>123 street ave, <br/>Somecity, <br/>Somestate 12345"

Thank you.
 
Back
Top