Hi,
here below explains how to embed PHP code in HTML files. Is there any name to referrer that way of writing PHP ?
http://onlamp.com/pub/a/php/2001/05/03/php_foundations.html
Javi
Hi,
here below explains how to embed PHP code in HTML files. Is there any name to referrer that way of writing PHP ?
http://onlamp.com/pub/a/php/2001/05/03/php_foundations.html
Javi
You just took it wrong. It is not PHP being embedded in HTML, but HTML being embedded in PHP.
To run PHP code a PHP interpreter is required. And usual browser doesn't have one.
Thus, you can add PHP code to HTML archive but it just won't work.
While embedding itself is called Escaping from HTML
I assume you are referring to the syntax in that article that looks like this:
<?php if(conditions): ?>
... HTML CODE ...
<?php endif; ?>
That's called the Alternative Syntax for Control Structures. Unfortunately, that doesn't really roll off one's tongue very well.
The article also shows an example of the short open tag:
<?=$var?>