I think in need to clear up some confusion of a previous question.
I want to avoid the paragraph problem when a user enters data in a textarea box. If the user doesn't know html but hits the enter key 2 times to try and make a paragraph effect, i want to maintain that in the DB output back to the screen rather than running everything together.
thanks
are you talking about the nl2br() function?
kinda, but i don't want the user to have to but in any code at all. i want them to type in there paragraphs, hit submit, and when i output it to the screen, i want it to look just as they typed it in paragraphs.
That's what the nl2br() function does, it translates all newlines to BR tags. Try it.
How exactly do you do it?
You have a variable that is your text right?
$text
Then you just use the function to output the text.
echo nl2br($text)
or you could set the function to a new variable like
$textspace = nl2br($text);
echo $textspace;