Parse php in html

Is the any way to parse php code in html files.

I have tried the following (and many variations of it) in .htaccess but it didn’t work

AddType application/x-httpd-php .php .html
AddHandler x-httpd-php .php .html

Any suggestions?
Thank you

welcome to the community.

the easiest way would be to do it the other way around write html within a .php

For example inde.php

<html>
<body>

<h1>My First Heading</h1>

<p><?php echo '<p>Hello World</p>'; ?> </p>

</body>
</html>

Depends on your setup.

Nginx doesn’t support .htaccess so if you are running nginx standalone.

You need to modify the templates:

And include .html in the list