You are here: Re: Problem echoing \r\n « PHP Programming Language « IT news, forums, messages
Re: Problem echoing \r\n

Posted by Mike Roetgers on 04/02/07 12:08

andy.z@blueyonder.com schrieb:
> If I set a varaible as
>
> $EOL = "\r\n"
>
> But then want to echo that to a HTML page to see the above string
> i.e. \r\n
>
> by doing: echo($EOL);
>
> How do I do it?
>
> I've tried quotemeta, addslashes and htmlspecialchar
> but can't seem to work it out.
>
> thanks
>
> Andy

It should work with single quotes:
$EOL = '\r\n';
echo $EOL;

That should output:
\r\n

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация