Ask coding questions

← Back to all posts
PHP in HTML
ShervinBashar

When can we except to be able to implement PHP in our HTML files?

Answered by ch1ck3n [earned 5 cycles]
View Answer
Comments
hotnewtop
ch1ck3n
Saml2020

@ShervinBashar
PHP is processed server side, meaning they are not like javascript. You cannot add PHP to a HTML file, send it to the client's browser and expect it to work.

A PHP repl is needed. You can use the PHP repl for normal HTML as well.

SixBeeps

What's wrong with the PHP Repl?

ShervinBashar

@SixBeeps Nothing all good. Just want to add PHP inside my HTML files and save them as HTML. Cheers