Cameron Garnett/Testpage4

Super Quick PHP Tutorial
Introduction
 * Basic Syntax
 * Sending Data to the Browser
 * Comments
 * Variables
 * Strings
 * Functions
 * Quotes
 * Debugging
 * Form

What Do I Need?
To start using PHP, you can:


 * Find a web host with PHP and MySQL support
 * Install a web server on your own PC, and then install PHP and MySQL
 * Use a Web Host With PHP Support

If your server has activated support for PHP you do not need to do anything. Just create some .php files, place them in your web directory, and the server will automatically parse them for you. You do not need to compile anything or install any extra tools. Because PHP is free, most web hosts offer PHP support.

Set Up PHP on Your Own PC
However, if your server does not support PHP, you must:
 * install a web server
 * install PHP
 * install a database, such as MySQL
 * The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php

Basic Syntax
Getting Started: A PHP script starts with :



Write this block of code into note pad ++ and save the file as example.html

At the end of each statement or line it is important that you have a semicolon ; that represents the end of a line

Case Sensitive
In PHP classes, functions, and user-defined functions are NOT case-sensitive. For example

All 3 echo statements are true and will work because the echo function is not case-sensitive. It is different when you are working with a variable name. You must be careful because these are case-sensitive. For example

Only the first echo statement is true this is because ($weather, $WEATHER and $weaTHER) are treated as 3 different variables.