PHP makes your web pages come alive in ways no static page can match. Here are some of the significant points about getting started:
The PHP installation instructions vary by operating system and version and can be very involved. To install PHP, use the instructions that come with the PHP download.
To test your installation of PHP, try typing php -v on the command line; if you see PHP version information, you've been able to access PHP.
To work with PHP, you have to set up your development environment, which includes a text editor or PHP IDE. Your development environment should also include some way of installing PHP pages where the server can reach them.
PHP scripts enclose executable PHP between the markup <? and ?>. You can add HTML to the same page, as long as it's outside the <? and ?>.
The echo statement echoes text to the browser.
Here documents let you echo every word in them until the end token is encountered.
There are three types of comments in PHP: /* */, //, and #.
You prefix variable names with a $, and a valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores.