You can use single quote strings:
$var = 'pas$wd';
This way the variables will not be interpolated.
Alternatively, you can exit the $ sign with \ :
$var = "pas\$wd";
And, for the sake of completeness, with PHP> = 5.3, you can also use the NOWDOC (single quote) syntax:
$var = <<<'STRING' pas$wd STRING;
As a reference, see the PHP Manual Strings page (with a few suggestions):
Note: [...] variables and escape sequences for special characters will not expand when they occur in single quotes.
AND:
If the string is enclosed in double quotation marks ( " ), PHP will interpret more escape sequences for special characters:
\$ : dollar sign
source share