For starting this PHP language, I use the ubuntu 22.04 server operation and place the file PHP in folder /etc/www/html , if want to edit main website and you need to edit to /etc/www/html/index.html file
in Below is example mz_01.php is php file but with HTML language, with started with DOCTYPE, Html, Head and Body.
- Document type : <!DOCTYPE html>
- <html>
- Head : <head>…..</head>
head is started with <head> and closed with </head>
- Body : <body>…..</body>
- </html>
But if you want to start the PHP language, you just need to write with opened by <?php, insert item/function/variable, and closed with ?>