Pure HTML is static text files with dead content that want everything but to change. However by the help of a service scripting language such as PHP, HTML can be dynamic and changes every time you make a different request to the server.
PHP is born with HTML rendering in mind. So it’s plain easy to write PHP from inside HTML. Just use:
<?php //php code goes here ?>
For example, we have a variable named $url to be the URL address of a web document, let’s run and present it inside with HTML so that the client browser gets the actual value dynamically:
<a href="<?php echo $url; ?>">pricing table</a>
There you go. To run PHP around HTML, just enclose the code with <?php … ?>.
You should also read:
- The Ultimate Way to Cloak and Hide any Website Address or URL (Stealth Forwarding)
- How to display HTML code on a web page?
- PHP and JavaScript Variable / Value Transfer / Exchange: How to pass variable values from PHP to JavaScript or JavaScript to PHP?
- PHP: Run HTML as PHP
- How to make IE6 to style HTML 5 tags?


Facebook
Twitter
Google Plus
{ 1 comment… read it below or add one }
It is helpful when i want to insert mail functionality to my site pages.
{ 1 trackback }