Re: Newline

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

 



I use

echo 'Blah blah
blah blah


blah.';

On 10/28/07, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote:
> On 10/28/07, magoo <i.am.magoo@xxxxxxxxx> wrote:
> >
> > Hi NG!
> >
> > I have switched to using single quotes, and found out that newline (\n)
> > only
> > works in double quotes. It looks kind of stupid using 'someString'."\n";
> > and
> > it`s kind of inconsistent using double quotes for some lines like
> > "someString\n";.
> > What`s the best way to get a consitent code?
> >
>
> choose the string syntax that best fits the purpose of the given string.
> if a string will not have variables embedded in it, or special characters,
> use
> single quotes.  if it will, use double quotes.
> if you have a particularly long string, with variables and special
> characters
> consider Heredoc.
>
> -nathan
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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