Enable php code to work inside a .html / .htm file

⌘K

To get this to work you need to edit your
httpd.conf file.

Find the line that looks similar to this:
AddType application/x-httpd-php .php
and change it to look like this:
AddType application/x-httpd-php .php .htm .html
and all should be fine

If the server is shared :

Instead it can be put in .htaccess for the site.

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

Please restart httpd service after this