Re: TEXT fields without line breaks

From: Date: Fri, 06 Jul 2001 15:46:55 +0000
Subject: Re: TEXT fields without line breaks
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10121@lists.php.net to get a copy of this message
The line breaks may be there, but HTML will not render them. Try this: $outputstring = nl2br($stringfromDB); print("<p>$outputstring</p>"); or something like this to see if the newlines will convert to <br> and render correctly. John On Fri, 6 Jul 2001, Mat Marlow wrote: >-Hi all, >-(I'm not sure if this is the right place to submit this but I'm having >-problems with the php.general group) >- >-I am in desperate need for a solution to HTML text fields not storing new >-lines. I'm storing news articles in a database but all the text just ends up >-in a big block because it ignores line breaks. Is there a way around this >-without having to upload text files? >- >-Thanks, >- >-Mat >- >- >- >- >- >--- >-PHP Database Mailing List (http://www.php.net/) >-To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >-For additional commands, e-mail: php-db-help@lists.php.net >-To contact the list administrators, e-mail: php-list-admin@lists.php.net >- ************************************** John Huggins Virginia Net Corporation 7101 Oriole Avenue Springfield, VA 22150 703-912-6214 703-912-4831 fax jhuggins@va.net http://www.va.net/ **************************************

« previous php.db (#10121) next »