Re: end of line

From: Date: Mon, 30 Aug 2004 18:01:42 +0000
Subject: Re: end of line
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-35950@lists.php.net to get a copy of this message
good call -- -------------------------------------------------------------->> Jasper Howard :: Database Administration Velocity7 1.530.470.9292 http://www.Velocity7.com/ <<-------------------------------------------------------------- "Peter Ellis" <terra@ix.netcom.com> wrote in message news:1093888510.1145.20.camel@localhost... > If you're starting with a <p>, shouldn't it be: > > str_replace("\n","</p><p>",$string); > > This would make more sense to me, since you've already opened the tag > elsewhere. > -- > Peter Ellis - pellis@naturalaxis.com > Web Design and Development Consultant > naturalaxis | http://www.naturalaxis.com/ > > On Mon, 2004-08-30 at 10:22 -0700, Jasper Howard wrote: > > I would start with a <p>, then print the data from the database, > > str_replace("\n","<p></p>",$string); and then end with a </p>, that way you > > have opening and closing <p></p> tags. > > > > -- > > > > > > -------------------------------------------------------------->> > > Jasper Howard :: Database Administration > > Velocity7 > > 1.530.470.9292 > > http://www.Velocity7.com/ > > <<-------------------------------------------------------------- > > "Marcjon" <marcjon@fastmail.fm> wrote in message > > news:1093844358.24698.203307089@webmail.messagingengine.com... > > > Try this: > > > echo str_replace ( "\n", "<p>", $string); > > > > > > I believe it always stores newlines as \n, since PHP and MySQL are > > > native to Unix/Linux. > > > -- > > > Marcjon

« previous php.db (#35950) next »