Re: BREAK into the DB

From: Date: Mon, 15 Jul 2002 10:59:51 +0000
Subject: Re: BREAK into the DB
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-107687@lists.php.net to get a copy of this message
the function you are looking for is called nl2br(). Translated it means 'new line to <BR>.' when you pull you text from your database run it through this and it will be correctly formatted for HTML to read correctly. See php documentation for further discussion and examples. blue "César aracena" <icaam@icaam.com.ar> wrote in message news:000601c22bbc$7b79c8a0$cfc405c8@gateway... Hi all. I have this DB where I'm storing this sometimes large amount of text into a TEXT field, but I can't seem to find the way to BREAK lines so it won't make my browser go 3000 pixels wide when that text is printed. About this, I have two questions: 1) What should I use to break the text into lines at the DB so HTML can read them fine? and 2) How should I make the TEXT INPUT BOX so the visitor doesn't have to type <br> or something after 20 words or so? Is there a way that PHP can count and break text strings by itself prior storing? Thanks in advance, Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621

« previous php.general (#107687) next »