PHP Cheatsheet
PHP Cheatsheet
Variables
Variable names use underscores between “words” for complex names. They
begin with $
and end with ;
.
Conditional Tests (if)
Place if
, elseif
, else
and the ending }
on separate lines.
Operators
Function Definitions
Function should return values which can be assigned to variables.
Arrays
Arrays hold values and are referenced by their position, with positions
starting at 0.
Associative Arrays
Associative arrays hold values and are referenced by their key
assignment. They are often referred to as key
value
pairs.
Loops
Loops allow you to repeat actions.