Simple Statements, Blocks, Compound Statements
A simple statement is an expression evaluted for its results. A simple statement may be followed by a modifier (only one).
$rain = "wet"; # simple statmentAs you can see, all simple statments must end with a semicolon (;). Here are some other modifiers (not an exclusive list):
STATEMENT if EXPR;A BLOCK is when a group of statements are together in a sequence and are surrounded by curly braces ({}). When you use blocks with expressions you can build compound statements such as:
#sample compound statementNotice that you have an 'if' statement, followed by an 'expression', then an open curly brace {. The curly brace denotes the start of a block while the ending curly brace denotes the end of the block. The two statements in the middle comprise the body of the block.
Other compound statements (not an exclusive list):
if (EXPR) BLOCK