Re: Line Break Problem

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

 



2009/3/9 Alice Wei <ajwei@xxxxxxxxxxxxx>

>  I have a question regarding using line breaks in PHP. I have the code
> something like:
>
>       echo "1" . "\t " . $x . "\t" . $y . "\r\n";
>
> When I run the code, it looks like a whole blob of text, but when I use
> "View Source", the line breaks are formatted then correctly.
> Anyone can please tell me if this is what this is supposed to be?
> If so, how can I get the user to see the line break as they are, do I have
> to use <br>?


This has nothing to do with PHP. HTML does not show carriage returns or
repeated white-space. If you want carriage returns or tabs you need to use
appropriate tags and/or CSS.

-Stuart

-- 
http://stut.net/

[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