Page 1 of 1

String Replace

Posted: Thu Nov 01, 2007 10:04 pm
by iknownothing
Hey Guys,

I have a textbox where the client can enter in a multi-lined address. On submission, the textbox and databse both hold the separate lines, but when I put it into HTML, the lines die. I have used:

Code: Select all

str_replace("\n", "<br>", $theaddress);
but it doesn't seem to be working. Is there another way? Thanks.

Posted: Thu Nov 01, 2007 10:08 pm
by Kieran Huggins

Posted: Thu Nov 01, 2007 10:14 pm
by iknownothing
wow, i can't get over how simple that is, thanks Kieran!