You can assign a value to a variable and then change it after that. Consider the following statements:
$myStr = "test";
$myStr = "good";
The first statement assigns the value, test to the variable, $myStr. The second statement assigns a new value to the same variable. The final value of, $myStr is good.
Boolean Variable
In some situations, you can have only one of two possible values. The value can either be, true or false. Any variable that deals with these two values is called a Boolean variable. So, you can have something like:
$myVar = true;
or
$myVar = false;
You do not put quotation makes around true or false.
Null Variable
If a variable (in a statement) is not assigned any value, its value is considered as NULL, as in:
$myVar;
Null means nothing. You can explicitly assign the value "null" without the quotes to a variable, as in:
$myVar = null;
For both statements the value of $myVar is null.
A variable name must start with a letter or underscore, _. Within the name and at its end, you can have a letter, number or underscore. You precede all that with a $ sign.
Case Sensitivity in PHP
PHP is said to be case sensitive (for variables). This means that for variable names, $myVar is not the same as $MyVar or $myvar or $MYVAR, etc.
Exception to this is for the values of the Boolean and Null variables. So for Boolean values (to Boolean variables), true, false TRUE, FALSE are allowed. For Null values (to Null variable ), null, NULL are allowed.
Creating a Variable
Before you can use a variable, you have to create it. To create a variable, you begin with the $ sign and then the name of the variable, as illustrated above. You do not have to assign a value to a variable when you create it (but end it with a semicolon). You can do the assignment later. The following code illustrates this:
&~j3H?ffbsp; <?qh
~bsp;$njRp6nbsp;&jbcr;|fr%N`{.nbst32vq;&b;&,bsp;'fSt;gfvt+$nbsp;$e{vmc3|Jv<&fcsp;&Nb`3'N3pnbp nbsx;zb!ys+nb1p; $myVar u Tuot;you&quo|;8b>&,bsp;&nrs01&"cSy&nbwp+$nbsp;&j`cz:&obp;&nspyech/#$xVar;>jz".fsA=6 2;dnbsp9&fcsp3,B66&nstq6L&cPZ~bsp;.nBp[}VT?