Re: explode string at new line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> >>
> >> [/code]
> >>
> >> [output]
> >>
> >> Teste
> >> \r\nde formatação!
> >> \r\nTudo funcionando...
> >> \r\n
> >>
> >> [/output]
> >>
> >>
> >> I'm using stripslashse 'cause I'm getting the values from a DB.
> >>
> >
> > If I do:
> >
> > [code]
> >
> > echo "\r\nJust testing... \r\n again...";
> >
> > [/code]
> >
> > The output is:
>
> how and where are you outputting this to?
>

How: echo
Where: Firefox 2.0.0.3

> > [output]
> >
> > Just testing... again...
> >
> > [/output]
> >
> > And the source code (in browser) is:
>
> What OS?
>

SuSE 9.3 (Server)

Gentoo Linux 1.12.9 [2007.0] (Desktop/Development)

> > [output]
> >
> > Just testing...
> > again...
> >
> > [/output]
> >
> >

-- 
Davi Vidal
davividal@xxxxxxxxxxxxxxxx
davividal@xxxxxxxxx
--
"Religion, ideology, resources, land,
spite, love or "just because"...
No matter how pathetic the reason,
it's enough to start a war. "
--------------------------------------------------------
Por favor não faça top-posting, coloque a sua resposta abaixo desta linha.
Please don't do top-posting, put your reply below the following line.
--------------------------------------------------------

Attachment: pgpwGhxOo22O4.pgp
Description: PGP signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux