The benefit to using PHP is that it lets developers display far more interactive and dynamic web page content without bogging down the browser or consuming the user’s CPU. These scripts are embedded directly into the web page HTML that produces that static content of the page.
How to Embed PHP Into a Web Page
Embedding PHP functions into an HTML web page is very easy. Just preface the script with at the end of the script. Everything in between these tags will run on the server as a PHP script. The output of that script will be displayed on the page where you embedded it. One of the simplest PHP functions is the “echo” function, which returns plain text. Embedding a simple PHP function like this works as follows: When you open this file from a web browser, the output will look like this: