Re: replacing Carriage Return

From: Date: Mon, 17 Dec 2001 19:44:40 +0000
Subject: Re: replacing Carriage Return
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77988@lists.php.net to get a copy of this message
Phantom wrote:
I solicit information from a text field and save the data in mysql to be pulled out later and displayed as text on a webpage. However, Carrage Returns in the text field do not appear in the webpage text.
they're not supposed to show up in HTML ! you need to replace the "\n" that come from the textarea with the HTML Tag <br> to have line breaks in your HTML. nl2br() will do that for you.

« previous php.general (#77988) next »