That should be done like
$inputresult = str_replace("\n", "¶\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:[EMAIL PROTECTED]
Sent: 4. maaliskuuta 2003 11:06
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] \n
Hi John,
> Nothing fancy. Can't get it to echo �
Is that a pilcrow sign? If so, have you tried "¶" instead, like this:
$inputresult = str_replace('\n', '¶\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/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php