I changed the httpd.conf as follows:
DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs"
<Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs">
However Apache does not recognize the php code in my .html file. What other changes do I need to make for Apache to execute PHP?
It is by design. Apache will not parse PHP code inside a HTML file by default. You can include HTML codes in a PHP file as you would code them in a HTML document.
Renames your files and add extension
.php at the end they will parsed as you want.
Or you can configure your apache configuration (httpd.conf) to parse PHP code inside HTML too.
AddHandler application/x-httpd-php5 .html .htm
Or you can match extension and set their handlers like
<FilesMatch ".(htm|html|php)$"> SetHandler application/x-httpd-php </FilesMatch>