I'm having trouble with this. I don't know what it is but something in my current system causes text, added to the database via a textarea refuses to conform to the tables. In other words, my page has stopped processing line breaks on the browser so the text just keeps going until I stop and go into a new paragraph. This causes extremely large horizontal scrollbars on any large text block and is completely unacceptable.
Has anyone else had this problem? Can anyone tell me what to do about it?
The nl2br() function should do it for you.
$string = $row[stringfromdatabase]; echo nl2br($string);
You can also fix this problem by setting the textarea tag to hard wrapping, by:
<textarea cols="foo" rows="bar" wrap="hard"> </textarea>
nl2br() will certainly do the trick, as well, assuming the text has newlines in it.