nl2br is a useful function but probably not the right solution.
The right way to handle user input is to clean it up on input, before putting it into the database, not on output.
If people are entering text into an html textarea, you should identify paragraphs and enclose them in <p> .... </p> tags. Conventionally, blank lines separate paragraphs.
If you allow HTML tags on input, consider using the tidy library (built into PHP5, installable in PHP4) to clean up and validate the HTML.