Example:

Storing something in a variable, will allow you to use the variable throughout the script, if you want to store the information for longer then that, you may want to consider using a database, or session variables.

Data Types

The data types of your Variables is automatically determined doing execution of your script, therefor you don't need to worry about this. However it is a good idea to read up on it, as in languages like c/c++ asigning data types is done manually.

PHP Data Types:

Numeric

String

Array

The Numeric types are:

Integer

Double

The Integer Type contain number values, while the Double Type contain floating point values, see below:

Get the syntax right, and you can enter in just about anything, just like you would in your own language.

The "\n" is just a simple linebreak, the reason we use Double Quotes around it, is to make it appear as a linebreak in the final output. If use Single Quotes instead it will appear as the literal characters "\n" instead of the desired linebreak.