+ 1

How can I use html and php in the same time?

I would like to know

25th Aug 2018, 2:41 PM
Joel Lucio Mandrasse
Joel Lucio Mandrasse - avatar
4 odpowiedzi
+ 2
just write PHP code in html <? PHP code ?>
25th Aug 2018, 2:45 PM
Learner
+ 2
Note that PHP most come before <html>, just after doctype. Cheers.
25th Aug 2018, 4:12 PM
Tony
Tony - avatar
+ 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.
25th Aug 2018, 3:18 PM
BraveHornet
BraveHornet - avatar