RE: [PHP] \n

From: Date: Tue, 04 Mar 2003 09:22:26 +0000
Subject: RE: [PHP] \n
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138060@lists.php.net to get a copy of this message
That should be done like $inputresult = str_replace("\n", "&para;\n", $testtextarea); unless he really wants to output \n, not line change. <? $foo = "lines"; print "this is\ntwo $foo"; ?> outputs: this is two lines <? $foo = "lines"; print 'this is\ntwo lines $foo'; ?> outputs: this is\ntwo $foo String in enclosed by ' is exact, unlike ". Niklas -----Original Message----- From: Jon Haworth [mailto:jhaworth@witanjardine.co.uk] Sent: 4. maaliskuuta 2003 11:06 To: 'php-general@lists.php.net' Subject: RE: [PHP] \n Hi John, > Nothing fancy. Can't get it to echo ¶ Is that a pilcrow sign? If so, have you tried "&para;" instead, like this: $inputresult = str_replace('\n', '&para;\n', $testtextarea); Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ########################################### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ ########################################### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/

« previous php.general (#138060) next »