The PHP programming language is a server-side HTML embedded scripting language. Let‘s depict the sentence. The PHP language runs on the server-side. This means that the execution (read starting) of the scripts are done on the server where the web-site is hosted. HTML embedded means that you can use programming statements (read a piece of PHP code) from within an HTML code. PHP files are returned to the browser as plain HTML. The last piece of the sentence – scripting language – is a little harder to explain, but we will give it a go. A scripting language is a form of programming language that is usually interpreted rather than compiled. In programming languages such C or C++ you compile the program (permanently) into an executable file, before you can execute the program. A program that is written in a scripting language, is interpreted one command at a time by a command interpreter (Command interpreter is in most cases an executable written in another language (for instance C/C++) than the scripting language.) Some other examples of scripting languages are Perl, Phyton, Java and Ruby.

A last note: scripting languages are also often used by applications as control or configure language. An example: Firefox is written in C/C++ and can be controlled with JavaScript.

Things You Should Know

Because this is an HTML embedded language you should have a basic understanding of HTML/XHTML and (a little) JavaScript.

What is PHP?

  • Hypertext Preprocessor.
  • As we said before it is a server-side scripting language.
  • free and is an open source software product.
  • Scripts are executed on the server.
  • Supports many databases (MySQL, Sybase, Oracle and many others.)
  • Runs on different platforms (Unix, Linux, Windows.)
  • Compatible with almost all web-servers used today (Apache, IIS, etc.)
  • Contain plain text, HTML tags and scripts
  • Files can have one of the following extensions: php, php3 or phtml.

What do you need?

Before you can follow the coming PHP tutorials you need to have the following:

  • Access to a web server (like Apache)
  • PHP and MySQL should be installed on the web server.

The easiest way is to find a cheap web hosting plan that support PHP and MySQL (most of the web-hosting providers do.) For a couple of bucks a month you can get a virtual host. The advantage is that everything is already installed and that you can share your program (that you are going to write) with the rest of the world. If you don’t want to spend money, you can also install everything on your local machine. The easiest way is to install WAMP if you have a Windows machine and LAMP if you have a Linux machine. (WAMP = Windows Apache MySQL PHP and LAMP = Linux Apache MySQL PHP.) These packages install everything you need. Read the install manual of these packages for instructions. After installation you should have access to http://localhost in your browser.


PHP.NET: A good place to start is by skimming through the ever-growing list of frequently asked questions (with answers, of course). Then have a look at the rest of the online manual and other resources in the documentation section.