<?php...?> in html code ignored
Posted: Fri Jul 10, 2009 11:48 am
Embedding html in my php files works fine. Embedded php in an html file is ignored. For example, the following produces a blank page but with the head processed. Indeed, all html code is processed and no php code is. Any help offered will be much appreciated.
many thanks
scott
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title> Messing about </title>
</head>
<body>
<p>
<?php
echo 'hello world';
?>
</p>
</body>
</html>scott