You don't necessarily have to escape the dollar-sign before a variable if you want to output its name.
You can use single quotes instead of double quotes, too.
$var = "test";
echo "$var"; echo "\$var"; echo '$var'; ?>
Well, the reason for this is that the PHP Parser will not attempt to parse strings encapsulated in single quotes (as opposed to strings within double quotes) and therefore outputs exactly what it's being fed with :)
To output the value of a variable within a single-quote-encapsulated string you'll have to use something along the lines of the following code:
$var = 'test';
echo '$var = "' . $var . '"';