A PHP script or code executed on the server, and result display as plain HTML in web browser.
You can easy to add php code or script anywhere in the document.
A PHP script start and end with PHP tag:
<?php // you code write here ?>
Now, save file with .php extension.
Now write PHP code in HTML file.
<!DOCTYPE html> <HTML> <body> <h1>PHP Test code..</h1> <?php echo “Hello now you are learn with tracetrick”; ?> </body> </HTML>
Save the file and run on browser.
How to run your php code in browser?
Write the url in addressbar of browser
Above url: test is folder that include in htdocs folder.