What is the difference between single and double quotes in PHP and how does it affect variable parsing?

Using single quotes in PHP will treat everything within the quotes as a literal string, without parsing variables. On the other hand, double quotes will parse variables within the string and replace them with their values. To ensure proper variable parsing, use double quotes when you want variables to be evaluated and replaced within the string.

$name = "Alice";
echo 'Hello, $name'; // Output: Hello, $name
echo "Hello, $name"; // Output: Hello, Alice