You dont have escape quotes to display $variables in strings \"hello $nickname\" works fine. Only when your referencing an array do you need to \'..\'