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/","",stripslash
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...
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 f
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 [, i
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 \n
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
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 w
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",$_P
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...
Th
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
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 m
11 matches
Mail list logo