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