Re: line feed

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

 



Bruno Santos wrote:
> How do i print a line return using the echo command, for when i see the
> page source,
> i get the code line by line and not all in the same line.
>
> using double quotes ( " ), i can put \n at the end and i get the result
> i want,
> but, using sinle quotes ( ' ), \n doesnt work.
>
> if i use double quotes, in a simple html comand i need to use \"  and i
> dont want that.
>
> is any way i could use single quotes, and getting the line feed ??
> example:
> Double quotes:
>     echo "<table border=\"1\" width=\"800px\">\n";
>
> single quotes:
>     echo '<table border="1" width="800px">';

It's horrible code, but:

echo '<table border="1" width="800px">
';

is also syntactically correct and it will work...

I *THINK* '<...>{chr(10)}' might also work in PHP4 and beyond...

But {} might be only inside "" [shrug]

If I want \n I just use "" myself...

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