tags:

views:

100

answers:

3

Embedding HTML within .PHP files is one of the primary functionalities of PHP, but is it possible to do it the other way round?

I mean, embedding PHP tags, , within a .HTML document?? Is this sort of coding possible?

Any suggestions welcome.

+1  A: 

If you configure your server properly you can put php code in almost any kind of file.

Mike B
+1  A: 

If you are using apache, just add this line in the httpd.conf file

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

Now you can embed php tags in .html files and they will be parsed correctly

Checksum
+1  A: 

Add this to your .htaccess file and HTML files will be handled like PHP files allowing you put PHP in HTML files.

AddType application/x-httpd-php .html

Some more information on it here

Ben Shelock
The link explained everything mate, thanks a bunch:-D
DJDonaL3000