Re: Q. How to remove new line/CrLf in string??
| From: | André Cupini | Date: | Thu, 20 Mar 2003 20:39:53 +0000 |
| Subject: | Re: Q. How to remove new line/CrLf in string?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140474@lists.php.net to get a copy of this message | ||
Jack,
I replace the "\n" char by nothing in my scripts of the following form:
<?
$string = str_replace("\n", "", $string);
?>
--------------------------
André Cupini - Programador
------------------------------
andre@neobiz.com.br
--------------------------
NeoBiz - fábrica de internet
http://www.neobiz.com.br
--------------------------
----- Original Message -----
From: Jack Schroeder
To: php-general@lists.php.net
Sent: Thursday, March 20, 2003 5:19 PM
Subject: [PHP] Q. How to remove new line/CrLf in string??
Hello:
I am trying to use an ASCII/Txt database for a 'for sale by owner' site.
I need to figure out a way to remove any carriage returns entered into a
"Comments" string because \n is the record delimiter. I have tried the
nl2br() fundtion but that seems to ad the <BR> but doesn't remove the
\n. Any help any one.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php