Jim Lucas wrote:
Chris wrote:
Davi wrote:
Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu:
That's exactly correct. Except I /think/ you should use \n instead of
'\n'.
Thank you for the reply... =)
I'll check this... BTW:
array explode ( string $delimiter, string $string [, int
At 6/5/2007 10:50 PM, Jim Lucas wrote:
Windows uses \r\n newlines; *nix uses \n; Mac uses \r.
...
PHP Code:
$txt = preg_replace('/\r\n|\r/', \n, $txt);
Another way to write that PCRE pattern is /\r\n?/ (one carriage
return followed by zero or one linefeed).
I recall also running into
Em Quarta 06 Junho 2007 02:50, Jim Lucas escreveu:
Chris wrote:
Davi wrote:
Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu:
That's exactly correct. Except I /think/ you should use \n instead of
'\n'.
array explode ( string $delimiter, string $string [, int $limit] )
So,
Em Quarta 06 Junho 2007 10:54, Davi escreveu:
But... Why does it happen:
[code]
$object=mysql_fetch_object($result);
$texto = $object-texto;
$texto=preg_replace(/\r|\n/,,stripslashes($texto));
echo $texto;
[/code]
[output]
Teste
\r\nde formatação!
\r\nTudo funcionando...
\r\n
Davi wrote:
Em Quarta 06 Junho 2007 10:54, Davi escreveu:
But... Why does it happen:
[code]
$object=mysql_fetch_object($result);
$texto = $object-texto;
$texto=preg_replace(/\r|\n/,,stripslashes($texto));
echo $texto;
[/code]
[output]
Teste
\r\nde formatação!
\r\nTudo funcionando...
\r\n
Em Quarta 06 Junho 2007 13:20, Jim Lucas escreveu:
Davi wrote:
Em Quarta 06 Junho 2007 10:54, Davi escreveu:
But... Why does it happen:
[code]
$object=mysql_fetch_object($result);
$texto = $object-texto;
$texto=preg_replace(/\r|\n/,,stripslashes($texto));
echo $texto;
Hi all.
I've the fowlling string:
$_POST[my_text]=hi...\nthis is my multi-line\ntext;
Can I use explode to have something like:
$str[0]=hi...;
$str[1]=this is my multi-line;
$str[2]=text;
$str=explode($_POST[my_text],'\n');
TIA and sorry the *very* poor english.
--
Davi Vidal
[EMAIL
That's exactly correct. Except I /think/ you should use \n instead of '\n'.
On 6/5/07, Davi [EMAIL PROTECTED] wrote:
Hi all.
I've the fowlling string:
$_POST[my_text]=hi...\nthis is my multi-line\ntext;
Can I use explode to have something like:
$str[0]=hi...;
$str[1]=this is my multi-line;
Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu:
That's exactly correct. Except I /think/ you should use \n instead of
'\n'.
Thank you for the reply... =)
I'll check this... BTW:
array explode ( string $delimiter, string $string [, int $limit] )
So, I was wrong...
The right way,
Davi wrote:
Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu:
That's exactly correct. Except I /think/ you should use \n instead of
'\n'.
Thank you for the reply... =)
I'll check this... BTW:
array explode ( string $delimiter, string $string [, int $limit] )
So, I was wrong...
The
Em Quarta 06 Junho 2007 00:18, Chris escreveu:
Davi wrote:
Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu:
That's exactly correct. Except I /think/ you should use \n instead of
'\n'.
So, I was wrong...
The right way, probaly, is:
$str=explode(\n,$_POST[my_text]);
If
Chris wrote:
Davi wrote:
Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu:
That's exactly correct. Except I /think/ you should use \n instead of
'\n'.
Thank you for the reply... =)
I'll check this... BTW:
array explode ( string $delimiter, string $string [, int $limit] )
So, I
12 matches
Mail list logo