You are here: Re: <%variable%> in html template ?? « PHP Programming Language « IT news, forums, messages
Re: <%variable%> in html template ??

Posted by Chung Leong on 05/17/06 00:36

Phil Latio wrote:
> Just playing around with the idea of using a html template page to seperate
> the code from design. Very basic example below
>
> <html>
> <!-- hello.html -->
> <body>
> Hello <b><?php echo $message ?></b><br>
> </body>
> </html>
>
>
> <?php
> //hello.php
> $message ="Phillip";
> include("hello.html");
> ?>
>
> However I am sure I have used <%message%> within the html template before
> but this time it did not work. Is there something I should set-up in the
> httpd.conf so Apache knows <% %> are PHP tags?
>
> Cheers
>
> Phil

The syntax is <%=$message%> or the more PHP-like <?=$message?>

 

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

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