What is the difference between using single and double quotes for strings in PHP, and how does it impact variable interpolation?

Using single quotes in PHP defines a string literally without parsing any variables inside it, while double quotes allow for variable interpolation where variables are replaced with their values. If you want to include variables in a string and have them replaced with their values, you should use double quotes. If you want a string to be treated as-is without variable interpolation, you should use single quotes.

$name = 'Alice';
// Single quotes - no variable interpolation
echo 'Hello, $name'; // Output: Hello, $name

// Double quotes - variable interpolation
echo "Hello, $name"; // Output: Hello, Alice