PHP: What's the difference between ' (single) and " (double)?

Single quotes print the variable, but double quotes print the value of the variable.

For Example:

$var = "text";
echo '$var'; // prints $var
echo "$var"; //prints the value of $var, ie., text.
 
Back
Top