What is PHP?
PHP is a powerful, server-side scripting language that can be used to extend the functionality of your pages in many ways. It is available for all web hosting packages, and is invoked by naming the files that use it with the following extension:
.php
The syntax of PHP is very similar to popular programming languages such as C and Perl. If you have any previous programming experience, it is likely that you’ll be able to pick up PHP in short order. No one tutorial could ever cover the hundreds of built-in PHP functions, so we highly recommend following and reading over the related links given at the bottom of this article.
PHP is embedded in a page by enclosing commands within the start tag:
<?
echo "This text written by PHP!";
?>
Normal HTML tags and text cannot be included within blocks of PHP code. You can output HTML code from within a PHP block to the browser by using the echo command as shown above, or by ending the PHP block, outputting your HTML, and starting a new one. You can include as many separated blocks of PHP code in your file as you need, and any variables you set will be available to the block it was set in, and any block below that.
Further reading:
http://www.php.net/tut.php
http://www.w3schools.com/php/default.asp