You are here: Re: Simple question for once ? « PHP Programming Language « IT news, forums, messages
Re: Simple question for once ?

Posted by harvey on 05/11/07 16:51

In article <1178901903.347883.242440@o5g2000hsb.googlegroups.com>,
matt.farey@gmail.com says...
> On 11 May, 17:38, harvey <harvey....@blueyonzders.com> wrote:
> > How do I get a text string that may contain HTML tags to
> > echo out to a web browser verbatim?
> >
> > IE I want the tags to be printed out - not interpreted.
> >
> > Thanks
> $string = '<h1>likethis</h1>';
>
> echo htmlentities( $string );
> //or
> echo highlight_string( '<?php' . $string . '?>' );
> //where adding <?php is a trick to highlight non-php, if you dont
> mind the php tags appearing.(u could kill them afterwards)
>
>

That was fast -
I am a bit red faced as I actually recognise that command but thought it
did something else !

Your second method is a new one to me - I will experiment with that.

thank you !

 

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

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