Dollar ($) sign in password string treated as variable

$_DB['password'] = 'mypas$word';

Single quote strings are not processed and are taken “as-is”. You should always use single quote strings unless you specifically need the $variable or escape sequences (\n, \r, etc) substitutions. It’s faster and less error prone.

Leave a Comment