+ 1
How can I use html and php in the same time?
I would like to know
4 Answers
+ 2
just write PHP code in html
<?
PHP code
?>
+ 2
Note that PHP most come before <html>, just after doctype. Cheers.
+ 1
For this you need to run your php files on a webserver like apache.
You write php code and html in the same file like Satnam mention.
Your server will scan through the file and execute the php code and skip the html code. The HTML code is for the server just like raw data and will be executed by the client, but the php code will be executed by your server.