$newstring=nl2br($string);
- Original Message -
From: Jon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 11:11 PM
Subject: [PHP] Swapping BR for \n... ?
I'm processing a form but all the functions I've found on the web only
seem
to add the BR after the \n. I
I'm processing a form but all the functions I've found on the
web only seem to add the BR after the \n. I need to remove the
\n altogether - anyone know how I can kill the \n and put a BR
in it's place?
Sounds like you want a simple ereg_replace(\n, BR, $sourcestring);
Jason
--
PHP
Isn't there a function br2nl() and it's relative nl2br() ??
-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 3:14 PM
To: 'Jon'; [EMAIL PROTECTED]
Subject: RE: [PHP] Swapping BR for \n... ?
I'm processing a form but all the functions
Or an even simpler str_replace(\n, BR, $sourcestring);
-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 15:14
To: 'Jon'; [EMAIL PROTECTED]
Subject: RE: [PHP] Swapping BR for \n... ?
I'm processing a form but all the functions I've
Isn't there a function br2nl() and it's relative nl2br() ??
There's nl2br, but I don't believe there's one that goes the other way.
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
, January 30, 2002 15:14
To: 'Jon'; [EMAIL PROTECTED]
Subject: RE: [PHP] Swapping BR for \n... ?
I'm processing a form but all the functions I've found on the
web only seem to add the BR after the \n. I need to remove the
\n altogether - anyone know how I can kill the \n and put a BR
On this page at php.net http://www.php.net/manual/en/function.nl2br.php#
You will find a function by [EMAIL PROTECTED] which is a great
implimentation of replacing the /n in a line. I would suggest you take a look.
Gerard
At 03:19 PM 1/30/2002 +1100, Jason Murray wrote:
Isn't there a
7 matches
Mail list logo