7 - PHP - Introduction
What is PHP?
PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
Simple answer, but what does that mean? An example:
<html>
<head>
<title>Example</title>
</head>
<body>
<?php
echo "Hi, I'm a PHP script!";
?>
</body>
</html>
Notice how this is different from a script written in other languages like Perl
or C -- instead of writing a program with lots of commands to output HTML, you
write an HTML script with some embedded code to do something (in this case,
output some text). The PHP code is enclosed in special start and end tags that
allow you to jump into and out of "PHP mode".
What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server. If you were to have a script similar to the above on your server, the client would receive the results of running that script, with no way of determining what the underlying code may be. All the PHP code gets executed on the server, and the server generates the html of the page, based on the outcome of the PHP programming.
PHP is extremely simple for a newcomer, but offers many advanced features for a professional programmer. You can jump in and be writing simple scripts quickly. And once you do that, you'll probably be hooked!
Let's take a look at one of my sites that uses PHP extensively.
(from php.net)