RE: Printing \n and \r to the screen

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

 



[snip]
I seem to be having trouble with \n and \r in variables. I write my
code on a linux box, and the server is linux. So I should always have
\n\r, no? Is there a way the I could print $variable; and have it show
me the /n and /r 's ? I tried with a srt_replace() on /n and on /r, 
but they do not get replaced. I also tried escaping the backslash,
then double escaping that as was suggested somewhere in the
php.net/manual, then triple escaping!

Thanks ahead of time for any insight.
[/snip]

Print to the screen? You could enclose them in single quotes '\n\r'. Are
you tring to make these work in a web browser? Because if so it'll never
happen, they do not show up. (but you can see the result when you view
source) Anything output to the browser to represent this should have a
<br> or <br />

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