Monday, February 16, 2009

How PHP is embedded in HTML?

  Kaushal Patel       Monday, February 16, 2009
In below example you will see how you can embed PHP in your HTML Script.

<HTML>
<HEAD>Sample PHP Script</HEAD>
<BODY>
<?php
echo "Kaushal Patel is working as SEO";
?>
</BODY>
</HTML>

When the PHP interpreter reached the php tag the server will run the code and send the output to the system. PHP then replaces that PHP code with its output. Thus the output would be as following.

<HTML>
<HEAD>Sample PHP Script</HEAD>
<BODY>
Kaushal Patel is working as SEO
</BODY>
</HTML>

At Last the HTML code is execute the result on your browser.

logoblog

Thanks for reading How PHP is embedded in HTML?

Previous
« Prev Post

No comments:

Post a Comment