Re: outputting a carriage return

From: Date: Thu, 17 Jul 2003 13:16:25 +0000
Subject: Re: outputting a carriage return
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-155603@lists.php.net to get a copy of this message
Hi, take a look at thedoc... there is a function called nl2br() to convert \n to <br> for html display. regards, P.E. Baroiller "Bob pilly" <bobpilly@yahoo.co.uk> a écrit dans le message de news:20030717131224.56870.qmail@web40510.mail.yahoo.com... > Hi all > Can someone tell me why if i echo a line like this: > > > echo "this is a \n newline"; > the output is: > this is a > newline. > > But if i do this: $text="this is a \n newline"; > echo $text; > the output is: > this is a newline? > > Is there something i have to do to a variable in order for echo or print to treat special chars like '\n' correctly? > > Thanks for any answers in advance! > > > --------------------------------- > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

« previous php.general (#155603) next »