ok, short and simple, i lose all html text formatting when i post text to a variable,
this is a Stupid Test
this
is a
Stupid Test
once posted in a textarea box and echo'd comes out as:
How can i stop this and keep the new lines?
Daf.
[man]nl2br[/man]
for some reason that didnt do anything for me.. i duno why
Let's see what you're doing... The way it works is during output. So if they entered
Hello My Name Is Bob
You insert that in the database, then when you go to output it, you use nl2br
echo nl2br($text);
ah ha.. i got it wrong by using the function wrong..
nl2br($text); echo $text;
instead of
Cheers.