I have a form with a textarea, how would I go about replacing <return> with <br>.
for example, if I am typing something and I hit enter twice, I want those two returns to be replaced with <br>'s so I dont have to manually type them in. as it stands now when I hit enter twice, in the database, its still one big paragraph.
I would assume I need to use str_replace() or preg_replace() but I have tried both with no luck. I did...
str_replace("\n", "<br>", $post_row[post]);
and
preg_replace("\n", "<br>", $post_row[post]);
Where did I go wrong?
thanks.