A variable can be thought of as an imaginary spreadsheet cell, the contents of which you can call on when needed.
Variables in PHP begin with a dollar sign -- $ If you wanted a variable to contain a name, you can assign it like this:
$name = "John Doe";
The variable is called $name -- and the content of the cell is - John Doe. Note - don't start a variable with a number - $3 Note that a variable needs to be enclosed inside double quotes to allow it to expand and deliver a proper result. |