Here are the most important things to know about variables in PHP
âœ¦ All variables in PHP are denoted with a leading dollar sign ($).
âœ¦ The value of a variable is the value of its most recent assignment.
âœ¦ Variables are assigned with the = operator, with the variable on the left-hand side andÂ the expression to be evaluated on the right.
âœ¦ Variables can, but do not need, to be declared before assignment.
âœ¦ Variables have no intrinsic type other than the type of their current value.
âœ¦ Variables used before they are assigned have default values.