What is the difference between using single quotes and double quotes in PHP and how does it affect variable interpolation?
When using single quotes in PHP, variables are not interpolated, meaning their values are not inserted into the string. However, when using double quotes, variables are interpolated and their values are included in the string. To ensure variable interpolation, always use double quotes when you need to include variables in a string.
$name = "Alice";
echo 'Hello, $name'; // Output: Hello, $name
echo "Hello, $name"; // Output: Hello, Alice