for example lets say i entered this information on my form textarea:
INPUT
wallpaperama is cool
this is the second line
and this is the fourth line
this is the second line
and this is the fourth line
so when i get the information from my database and i display it on my web page, is shows like this:
OUTPUT
wallpaperama is cool this is the second line and this is the fourth line
as you can see, its a long continous line and that's not how it was entered, i want to show it as the user entered it. so how do you do it.. simple
i created a function or a class you can use to format the text so that it will show exactly as it was entered into the form
PHP FUCNTION:
function form_txt($text){
$text = str_replace("n", '<br>',$text);
return $text;
}
lets say my datbase field is called content
so using the function above i can clean up by using this code:
CODE:
echo form_txt($content);
so once i do that it will display my content as this:
wallpaperama is cool
this is the second line
and this is the fourth line
this is the second line
and this is the fourth line
