Re: Linebreak

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

 



On Thu, April 20, 2006 9:47 pm, Peter Lauri wrote:
> I feel stupid.
>
> In many examples I have seen similar to:
>
> echo '<p>Whatever.</p>\n';
>
> echo '<p>An other whatever.</p>\n';
>
> But my PHP outputs the \n instead of a new line in the source.
>
> I am stupid?

No, just naive. :-)

Quotes (") and Apostrophes (') are not QUITE the same in PHP.

To some degree, they are VERY different.

' has only two (2) special characters:  ' and \

" has a lot of special characters, and interpolates variables and
one-dimension arrays.

\n only works in " not in '

Read this and you'll be WAY ahead of the game:
http://us2.php.net/manual/en/language.types.string.php

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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