Re: explode string at new line

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

 



Em Quarta 06 Junho 2007 00:18, Chris escreveu:
> Davi wrote:
> > Em Terça 05 Junho 2007 23:52, heavyccasey@xxxxxxxxx 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 it's coming from a <textarea> you'll want to use "\r\n" because a
> textarea uses both a carriage return (\r) and newline (\n) to separate.
>
> Otherwise each element of the array will have a \r on the end which may
> end up causing you some issues later on.
>

Yes. Is a textarea. Thank you very much! =D


-- 
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: pgpRLTuISARnH.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