actually as long as the var is contained within a double quoted string it will be fine , if you put it in a single quoted string like you just did, you cause an error
for example take this test script
you should find that outputs
for example take this test script
Code:
$a = "test"; echo "double quotes: $a"; echo " "; echo 'single quotes: $a';
Code:
double quotes: test single quotes: $a
Comment