[PHP] Q. How to remove new line/CrLf in string??

2003-03-20 Thread Jack Schroeder

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



Re: [PHP] Q. How to remove new line/CrLf in string??

2003-03-20 Thread André Cupini
Jack,
I replace the \n char by nothing in my scripts of the following form:

?
$string = str_replace(\n, , $string);
?

--
André Cupini - Programador
--
[EMAIL PROTECTED]
--
NeoBiz - fábrica de internet
http://www.neobiz.com.br
--

  - Original Message - 
  From: Jack Schroeder 
  To: [EMAIL PROTECTED] 
  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


Re: [PHP] Q. How to remove new line/CrLf in string??

2003-03-20 Thread Jack Schroeder
Thank you very much. 
Jack 

André cupini wrote:
 
Part 1.1Type: Plain Text (text/plain)
Encoding: quoted-printable

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php