Difference between single quote string and double quote
In : BCA Subject : PHP and MySQLVariable expansion is not supported by single quotes, but it is supported by double quotes.
If a variable is placed in a string using single quotes, the variable's value will not be substituted in the string.
e.g.
<?PHP
$str = ‘datahere’;
echo ‘$str is a site which provides tips.’;
?>
Output will be: $str is a site which provides tips.
In case of double quoted string…
<?PHP
$str = ‘datahere’;
echo “$str is a site which provides tips. “;
?>
Output will be: datahere is a site which provides tips.
Means if there is a string with double quotes and if you place a variable in that, it will substitute its value in string.