Following an example of using php code inside html on the W3 page I have the following code inside my html code:
<!DOCTYPE html>
<html>
<body>
<p>First try with php:</p>
<?php
echo "My first PHP script!";
?>
</body>
</html>
But only the text in the paragraph tags is shown (when opening the html
page in a browser). Is there something wrong with the syntax? Do I need to configure something else in some setup?
Additional information: When I browse to a file test.php
with the following content
<?php phpinfo() ?>
I get a whole bunch of configuration information; this shows me that apache is correctly configured for php. But why does the simple example above not work then?