Variables- things that can change depending on circumstances.
The reference to a variable begins with a $ (The variable from the
form if in html, does not have the $ )
They are case sensitive
The can't start with a number following the $
Try to avoid Pre-existintg or Built in Functions
Variables can be declared simply by setting a value.Types of
variables: Defined by first instance of the assigned value- Also can be
reassigned uppon reassignment in subsequent instances.
Integer- whole numbers Ex. $totalquantity=0
Double- Real numbers EX. $totalamount=0.00
String- Characters
Array- Multiple data or table
Object- an object.
Scope of the variable can be Global (the entire script), Local (just
for this instance) or local to global.
Constants- Things that do not change within the course of the
scripts
The are represented in all upper case letters
There is no $ in front of a constant.
Can be defined by the simple assignment as follows:
define ("TIREPRICE",
100);
Operators- are used to signify mathmatical operations.
Operator examples
= is an assignment
+ add
- subtrack
/ divide
* multiply
. concatonate (append)
Applies to numbers
Strings will have a value of 0 when used in these expresssions.