Reply to Re: Simple question for once ?

Your name:

Reply:


Posted by shimmyshack on 05/11/07 16:45

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)

[Back to original 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

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