Jump to content

<textarea> formatting. Possible?


MinusMyThoughts

Recommended Posts

hi again!...i've got a dynamically loading page now that displays the contents of my selected database entry for editing and so on. if this website were a game, i'd be winning. :)...i've got a problem, though, with the way my textarea is reading the database. when i put my variable into the textarea, it's placing a <br/> after every line break......so, what i'm asking is this: can you take out HTML from a textarea and preserve the line breaks?...thanks!love,jason

Link to comment
Share on other sites

amazing, as always! except i ended up using:str_replace("<br />","",$code);when it was replacing it with "\n" i was causing something that should have looked like this:Test text.More test text.to look like this:Test text.More test text.so by replacing <br /> with nothing, i was able to keep the same formatting without having the potentially confusing HTML in the text......thanks again!love,jason

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...