how to write php script in index.html
Paste the code in ur .htaccess file
AddType application/x-httpd-php .php .htm .html
Save and close the .htaccess file. Upload it to your webserver (to your WWW root).
Sample PHP code in a .html webpage
Now create a test file and filename it test.html
Copy the following html
into it:
php:
Upload it to your web server and view it using your browser. You will see that it works fine.