illustrate
1. Double quotes explain variables, single quotes do not explain variables.
2. Insert single quotes within double quotes. If there are variables in single quotes, interpret the variables.
3. There must be a non-number after the double-quoted variable name.
Special characters such as letters and underscores, or enclosing the variable with {}, otherwise the part after the variable name will be treated as a whole, causing a syntax error.
4. Single quotes are more efficient than double quotes.
You can use single quotes as much as possible for single quote characters.
Example
$s='a b'; $r = str_replace('t', ',', $s); echo 'Single quote: '.$r.'<br>'; $r = str_replace("t", ',', $s); echo 'double quotes: '.$r.'<br>';
The above is the difference between double quotes and single quotes in php. I hope it will be helpful to everyone.